diff --git a/SynologyTimedShutdown.sh b/SynologyTimedShutdown.sh index c3c452e..7da4185 100644 --- a/SynologyTimedShutdown.sh +++ b/SynologyTimedShutdown.sh @@ -16,10 +16,10 @@ fi ############################################################################ # Main loop ################################################################ -if [ `ps -ef | grep borgmatic | wc -l` > 1 ]; then +if [ `ps -ef | grep borg | wc -l` -eq 1 ]; then log "Triggering scheduled post-backup shutdown" shutdown now - exit 1 + exit 0 else log "Automatic shutdown cancelled due to concurrent backup task" exit 2