#!/bin/bash set -x systemctl -T -o verbose daemon-reload systemctl -T -o verbose disable --now test-timer.timer set -e wait_secs=20 run_at_time=$(date -d "+${wait_secs}sec" +"%H:%M:%S") logfile=/tmp/test-timer-output if [ -f ${logfile} ] then rm ${logfile} fi cat > /etc/systemd/system/test-timer.service <> ${logfile}" EOL cat > /etc/systemd/system/test-timer.timer <