#!/bin/sh set -e set -u P=/var/lib/ganeti/watcher.pause SKEW=1800 if [ -e "$P" ]; then until="$(cat "$P")" deleteafter=$(( until + SKEW )) now="$(date +%s)" if [ "$deleteafter" -lt "$now" ]; then rm "$P" fi fi