cron vars expansion

This commit is contained in:
tolerryan
2024-10-22 01:39:14 -05:00
parent 45074d258b
commit 4b140be7ca
3 changed files with 23 additions and 16 deletions

View File

@@ -105,10 +105,11 @@
echo "Backing up... to misamisa"
echo "Date: $(date '+%Y-%m-%d_%H-%M-%S')" # Add your Restic backup command here
restic --password-file ./.resticpassword -r sftp:misamisa://home/restic/$(hostname) backup $backupdir
if [ $? -eq 0 ]; then
status=$?
if [ $status -eq 0 ]; then
# If the exit status is 0 (success), send a success message
./discord.sh "$(hostname) backup complete"
elif [ $? -eq 3 ]; then
elif [ $status -eq 3 ]; then
./discord.sh "$(hostname) backup complete"
else
# If the exit status is not 0 (failure), send a failure message