diff options
-rw-r--r-- | etc/nextcloudpi-config.d/nc-backup.sh | 9 | ||||
-rwxr-xr-x | update.sh | 4 |
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 @@ -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 ) |