#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
set -e
if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((0 * 1024**3)) ]; then
    echo "stopping Hydra queue runner due to lack of free space..."
    systemctl stop hydra-queue-runner
fi
if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((0 * 1024**3)) ]; then
    echo "stopping Hydra evaluator due to lack of free space..."
    systemctl stop hydra-evaluator
fi


