homeserver/roles/mgrote.ecc-rasdaemon/templates/rasdaemon-cron.sh
2020-08-18 11:57:53 +02:00

13 lines
359 B
Bash

#!/bin/bash
#####################
## https://www.tothenew.com/blog/foolproof-your-bash-script-some-best-practices/
set -o nounset
set -o errexit
# trap ctrl-c and call ctrl_c()
trap ctrl_c INT
(
echo "--------------------------------------------------"
echo $(date)
/usr/sbin/ras-mc-ctl --status
/usr/sbin/ras-mc-ctl --errors
) >> /var/log/rasdaemon.log 2>&1