#!/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