Skip to content

Commit

Permalink
nc-backup: small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho committed Aug 10, 2017
1 parent 52051bb commit 7495d62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions etc/nextcloudpi-config.d/nc-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 )

Expand Down

0 comments on commit 7495d62

Please sign in to comment.