Automatic_PBS_Poweroff/autoShutdown

15 lines
274 B
Plaintext
Raw Normal View History

2022-05-25 12:52:18 +02:00
#!/bin/bash
while true
do
sleep 1800
2022-05-25 12:52:18 +02:00
tasks="$(proxmox-backup-manager task list --output-format json)"
if [ "$tasks" == '[]' ]
then
sleep 120;
2022-05-25 12:52:18 +02:00
tasks="$(proxmox-backup-manager task list --output-format json)";
if [ "$tasks" == '[]' ]
then
sudo shutdown now;
fi
fi
done