From f1a41080e7f946270d6a1c2e1144ebb5bc34e52e Mon Sep 17 00:00:00 2001 From: Michalis Kamburelis Date: Mon, 10 Jul 2017 02:32:23 +0200 Subject: [PATCH] Snapshots: fix dirs --- www/snapshots/pasdoc_snapshot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/snapshots/pasdoc_snapshot b/www/snapshots/pasdoc_snapshot index 882a660f..c3787681 100755 --- a/www/snapshots/pasdoc_snapshot +++ b/www/snapshots/pasdoc_snapshot @@ -33,6 +33,7 @@ ln -s `date +%F` "${OUTPUT_BASE_PATH}"latest # Clean old snapshots, to conserve disk space. # Keep only snapshots from last couple of days. +pushd . cd "${OUTPUT_BASE_PATH}" set +e find . -mindepth 1 -maxdepth 1 \ @@ -48,6 +49,7 @@ find . -mindepth 1 -maxdepth 1 \ '(' -not -iname `date --date='-7 day' +%F` ')' -and \ -exec rm -Rf '{}' ';' set -e +popd echo '---------------------------------------------------------------' echo 'Setting snapshots permissions:'