changed reference location
This commit is contained in:
parent
10893e1d5f
commit
58857451e3
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
source env.sh
|
||||
dir=$(dirname "${BASH_SOURCE[0]}")
|
||||
source $dir/env.sh
|
||||
DATE=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
echo "Backup $NAME at $DATE"
|
||||
BACKUP_CMD="restic backup $BACKUP_DIR"
|
||||
|
@ -18,12 +19,12 @@ fi
|
|||
echo "Not currently running. Continuing..."
|
||||
curl https://hc-ping.com/$HEALTHCHECK_UUID/start
|
||||
if [[ $PRE_RUN_SCRIPT ]]; then
|
||||
$(pwd)/$PRE_RUN_SCRIPT
|
||||
$dir/$PRE_RUN_SCRIPT
|
||||
fi
|
||||
$BACKUP_CMD
|
||||
if [[ $? == 0 ]]; then
|
||||
if [[ $POST_RUN_SCRIPT ]]; then
|
||||
$(pwd)/$POST_RUN_SCRIPT
|
||||
$dir/$POST_RUN_SCRIPT
|
||||
fi
|
||||
curl https://hc-ping.com/$HEALTHCHECK_UUID
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue