Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2017-08-01 22:19:24 +0300
committernachoparker <nacho@ownyourbits.com>2017-08-11 00:17:56 +0300
commit6617f29d3c087d575df6ee9853f5a90890fadf9e (patch)
treed1779f88d053a8d87ecc23d4aa4256946a6d1869
parentd819bbb625ebc9c63d9f4f43ce62a2f145c84a2c (diff)
nc-backup: small fixv0.18.6
-rw-r--r--etc/nextcloudpi-config.d/nc-backup.sh9
-rwxr-xr-xupdate.sh4
2 files changed, 7 insertions, 6 deletions
diff --git a/etc/nextcloudpi-config.d/nc-backup.sh b/etc/nextcloudpi-config.d/nc-backup.sh
index f9c91e5b..a7e1e3c8 100644
--- a/etc/nextcloudpi-config.d/nc-backup.sh
+++ b/etc/nextcloudpi-config.d/nc-backup.sh
@@ -55,10 +55,11 @@ configure()
# delete older backups
[[ $BACKUPLIMIT_ != 0 ]] && {
local NUMBKPS=$( ls $DESTDIR_/nextcloud-bkp_* | wc -l )
- ls -t $DESTDIR_/nextcloud-bkp_* | tail -$(( $NUMBKPS - $BACKUPLIMIT_ )) | while read f; do
- echo -e "clean up old backup $f"
- rm $f
- done
+ [[ $NUMBKPS > $BACKUPLIMIT_ ]] && \
+ ls -t $DESTDIR_/nextcloud-bkp_* | tail -$(( NUMBKPS - $BACKUPLIMIT_ )) | while read f; do
+ echo -e "clean up old backup $f"
+ rm $f
+ done
}
cd $BASEDIR/nextcloud
diff --git a/update.sh b/update.sh
index 21e6e03e..44f3a716 100755
--- a/update.sh
+++ b/update.sh
@@ -47,8 +47,8 @@ chmod 660 /usr/local/etc/nextcloudpi-config.d/*
# install web interface
cp -r ncp-web /var/www/
-chown www-data:www-data /var/www/ncp-web
-chmod 770 /var/www/ncp-web
+chown -R www-data:www-data /var/www/ncp-web
+chmod 770 /var/www/ncp-web
## BACKWARD FIXES ( for older images )