2020-08-18 11:57:53 +02:00
|
|
|
#!/bin/bash
|
2021-03-07 19:40:32 +01:00
|
|
|
{{ file_header | default () }}
|
2020-08-18 11:57:53 +02:00
|
|
|
#####################
|
|
|
|
## 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
|
|
|
|
(
|
2021-04-09 23:29:03 +02:00
|
|
|
/usr/sbin/ras-mc-ctl --status | ts '%Y-%m-%d - %H-%M-%S'
|
|
|
|
/usr/sbin/ras-mc-ctl --errors | ts '%Y-%m-%d - %H-%M-%S'
|
2020-08-18 11:57:53 +02:00
|
|
|
) >> /var/log/rasdaemon.log 2>&1
|