diff options
Diffstat (limited to 'bin/ncp/BACKUPS/nc-snapshot.sh')
-rw-r--r-- | bin/ncp/BACKUPS/nc-snapshot.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/ncp/BACKUPS/nc-snapshot.sh b/bin/ncp/BACKUPS/nc-snapshot.sh index df3bdfac..19699144 100644 --- a/bin/ncp/BACKUPS/nc-snapshot.sh +++ b/bin/ncp/BACKUPS/nc-snapshot.sh @@ -9,8 +9,6 @@ # -BASEDIR=/var/www - install() { wget https://raw.githubusercontent.com/nachoparker/btrfs-snp/master/btrfs-snp -O /usr/local/bin/btrfs-snp @@ -19,11 +17,11 @@ install() configure() { - sudo -u www-data php "$BASEDIR"/nextcloud/occ maintenance:mode --on + ncc maintenance:mode --on local DATADIR MOUNTPOINT - DATADIR=$( sudo -u www-data php /var/www/nextcloud/occ config:system:get datadirectory ) || { - echo -e "Error reading data directory. Is NextCloud running and configured?"; + DATADIR=$( ncc config:system:get datadirectory ) || { + echo -e "Error reading data directory. Is NextCloud running?"; return 1; } @@ -36,7 +34,7 @@ configure() btrfs-snp $MOUNTPOINT manual $LIMIT 0 ../ncp-snapshots - sudo -u www-data php "$BASEDIR"/nextcloud/occ maintenance:mode --off + ncc maintenance:mode --off } # License |