Skip to content

Commit

Permalink
nc-snapshot-auto.sh: Add missing import of library.sh in /etc/cron.ho…
Browse files Browse the repository at this point in the history
…urly/btrfs-snp (#1689)


Signed-off-by: thecalcaholic <[email protected]>
  • Loading branch information
theCalcaholic authored Jan 8, 2023
1 parent 000794a commit ef4fb3e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/ncp/BACKUPS/nc-snapshot-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ configure()

cat > /etc/cron.hourly/btrfs-snp <<EOF
#!/bin/bash
source /usr/local/etc/library.sh
DATADIR=\$(get_nc_config_value datadirectory) || {
echo -e "Error reading data directory. Is NextCloud running and configured?";
exit 1;
Expand Down
9 changes: 9 additions & 0 deletions updates/1.50.5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e
export NCPCFG=/usr/local/etc/ncp.cfg
source /usr/local/etc/library.sh

# Reinstall auto snapshot script to apply fix
[[ -f "$BINDIR/BACKUPS/nc-snapshot-auto.sh" ]] || exit 0
run_app nc-snapshot-auto

0 comments on commit ef4fb3e

Please sign in to comment.