mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 04:34:23 +00:00
feat: add info_print flag
This commit is contained in:
@@ -39,7 +39,7 @@ if [[ "--install" == $INSTALLED ]]; then
|
||||
crontab -l | grep -F "$CRON_JOB" > /dev/null 2>&1
|
||||
if ! crontab -l | grep -Fq "$CRON_JOB"; then
|
||||
(crontab -l 2>/dev/null; echo "$CRON_JOB") | crontab -
|
||||
info_print "Cron job added." 6
|
||||
info_print "Cron job added." $SUCCESS_FLAG
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -76,16 +76,16 @@ while IFS= read -r SOURCE_PATH || [ -n "$SOURCE_PATH" ]; do
|
||||
"${aws_cmd[@]}"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
info_print "Error while syncing $SOURCE_PATH to the AWS server." 3
|
||||
info_print "Error while syncing $SOURCE_PATH to the AWS server." $ERROR_FLAG
|
||||
BACKUPSUCCESSED=false
|
||||
exit 1
|
||||
|
||||
else
|
||||
info_print "Successfully synced $SOURCE_PATH" 6
|
||||
info_print "Successfully synced $SOURCE_PATH" $SUCCESS_FLAG
|
||||
BACKUPSUCCESSED=true
|
||||
fi
|
||||
else
|
||||
info_print "$SOURCE_PATH not found or inaccessible." 3
|
||||
info_print "$SOURCE_PATH not found or inaccessible." $ERROR_FLAG
|
||||
BACKUPSUCCESSED=false
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user