Skip to content

Commit

Permalink
nc-backup: fixes in checking space and auto
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho committed Feb 5, 2018
1 parent ee88645 commit 3a525c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

[v0.45.0](https://github.com/nextcloud/nextcloudpi/commit/645375f) (2018-02-03) update to NC 12.0.5
[v0.45.1](https://github.com/nextcloud/nextcloudpi/commit/4cea878) (2018-02-05) nc-backup: fixes in checking space and auto

[v0.45.0](https://github.com/nextcloud/nextcloudpi/commit/e229cba) (2018-02-03) update to NC 12.0.5

[v0.44.15](https://github.com/nextcloud/nextcloudpi/commit/3124d68) (2018-01-10) nc-init and samba: default to ncp user

Expand Down
2 changes: 1 addition & 1 deletion etc/nextcloudpi-config.d/nc-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ DATADIR=$( cd "$BASEDIR"/nextcloud; sudo -u www-data php occ config:system:get d
echo "check free space..."
SIZE=$( du -s "$DATADIR" | awk '{ print $1 }' )
FREE=$( df "$DATADIR" | tail -1 | awk '{ print $4 }' )
FREE=$( df "$DESTDIR" | tail -1 | awk '{ print $4 }' )
[ $SIZE -ge $FREE ] && {
echo "free space check failed. Need $( du -sh "$DATADIR" | awk '{ print $1 }' )";
Expand Down
11 changes: 5 additions & 6 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,16 @@ y
y
EOF

# update btrfs-snp
grep -q "btrfs subvolume list" /usr/local/bin/btrfs-snp && {
wget https://raw.githubusercontent.com/nachoparker/btrfs-snp/master/btrfs-snp -O /usr/local/bin/btrfs-snp
chmod +x /usr/local/bin/btrfs-snp
}

# update ncp-backup
cd /usr/local/etc/nextcloudpi-config.d &>/dev/null
install_script nc-backup.sh
cd - &>/dev/null

# update ncp-backup-auto
cd /usr/local/etc/nextcloudpi-config.d &>/dev/null
install_script nc-backup-auto.sh
cd - &>/dev/null

# refresh nc-backup-auto
cd /usr/local/etc/nextcloudpi-config.d &>/dev/null
grep -q '^ACTIVE_=yes$' nc-backup-auto.sh && activate_script nc-backup-auto.sh
Expand Down

0 comments on commit 3a525c1

Please sign in to comment.