edit to work without cron but with service file
This commit is contained in:
parent
b0e08611f8
commit
29ca8a31f6
@ -1,12 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
sleep 1800
|
||||||
tasks="$(proxmox-backup-manager task list --output-format json)"
|
tasks="$(proxmox-backup-manager task list --output-format json)"
|
||||||
if [ "$tasks" == '[]' ]
|
if [ "$tasks" == '[]' ]
|
||||||
then
|
then
|
||||||
sleep 300;
|
sleep 120;
|
||||||
tasks="$(proxmox-backup-manager task list --output-format json)";
|
tasks="$(proxmox-backup-manager task list --output-format json)";
|
||||||
if [ "$tasks" == '[]' ]
|
if [ "$tasks" == '[]' ]
|
||||||
then
|
then
|
||||||
sudo shutdown now;
|
sudo shutdown now;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user