From b0e08611f838fa9cf90db56e7b93e56483a751ea Mon Sep 17 00:00:00 2001 From: root Date: Wed, 25 May 2022 12:52:18 +0200 Subject: [PATCH] that is aquard --- autoShutdown | 12 ++++++++++++ poweroff | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) create mode 100755 autoShutdown delete mode 100755 poweroff diff --git a/autoShutdown b/autoShutdown new file mode 100755 index 0000000..fd5cbb3 --- /dev/null +++ b/autoShutdown @@ -0,0 +1,12 @@ +#!/bin/bash + +tasks="$(proxmox-backup-manager task list --output-format json)" +if [ "$tasks" == '[]' ] +then + sleep 300; + tasks="$(proxmox-backup-manager task list --output-format json)"; + if [ "$tasks" == '[]' ] + then + sudo shutdown now; + fi +fi diff --git a/poweroff b/poweroff deleted file mode 100755 index 00772a0..0000000 --- a/poweroff +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -tasks="(proxmox−backup−managertasklist−−output−formatjson)" -if["$tasks" == '[]' ] -then - sleep 300; - tasks="(proxmox−backup−managertasklist−−output−formatjson)"; - if["$tasks" == ’[]’ ] - then - shutdown now; - fi -fi