From 29ca8a31f658afb80a6519c422225ed9059d274d Mon Sep 17 00:00:00 2001 From: Erik Foris Date: Wed, 25 May 2022 12:10:17 +0000 Subject: [PATCH] edit to work without cron but with service file --- autoShutdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoShutdown b/autoShutdown index fd5cbb3..5b54c67 100755 --- a/autoShutdown +++ b/autoShutdown @@ -1,12 +1,15 @@ #!/bin/bash - +while true +do +sleep 1800 tasks="$(proxmox-backup-manager task list --output-format json)" if [ "$tasks" == '[]' ] then - sleep 300; + sleep 120; tasks="$(proxmox-backup-manager task list --output-format json)"; if [ "$tasks" == '[]' ] then sudo shutdown now; fi fi +done \ No newline at end of file