diff --git a/backup_new.sh b/backup_new.sh index b4c487c..954a944 100755 --- a/backup_new.sh +++ b/backup_new.sh @@ -80,16 +80,28 @@ seafSvc () { if [ "$1" = "start" ]; then if ! systemctl start "${seafService}" >> "$logFile" 2>&1; then exitError 100 "Could not start ${seafService}" + else + printf "${cyan}[%s] -- [INFO] Started service: %s --${norm}\n" \ + "$(stamp)" "$seafService" >> "$logFile" fi if ! systemctl start "${seafHub}" >> "$logFile" 2>&1; then exitError 101 "Could not start ${seafHub}" + else + printf "${cyan}[%s] -- [INFO] Started service: %s --${norm}\n" \ + "$(stamp)" "$seafHub" >> "$logFile" fi elif [ "$1" = "stop" ]; then if ! systemctl stop "${seafHub}" >> "$logFile" 2>&1; then exitError 103 "Could not stop ${seafHub}" + else + printf "${cyan}[%s] -- [INFO] Stopped service: %s --${norm}\n" \ + "$(stamp)" "$seafService" >> "$logFile" fi if ! systemctl stop "${seafService}" >> "$logFile" 2>&1; then exitError 102 "Could not stop ${seafService}" + else + printf "${cyan}[%s] -- [INFO] Stopped service: %s --${norm}\n" \ + "$(stamp)" "$seafHub" >> "$logFile" fi fi } @@ -334,8 +346,6 @@ if [ "$offlineBackup" -eq 1 ]; then printf "${cyan}[%s] -- [INFO] Stopping seafile services --${norm}\n" \ "$(stamp)" >> "$logFile" seafSvc stop - printf "${ok}[%s] -- [SUCCESS] Seafile services STOPPED --${norm}\n" \ - "$(stamp)" >> "$logFile" fi