I am using a simple shell script, started by system, to set LEDs on a Marvell Armada 370 plug.
The script uses a while loop with a "sleep 30" line
Exiting sleep seems to log to the journal, filling it with useless info.
How can I change this behavior?
The journal output looks like:
Dec 22 19:19:12 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 48min ago
Dec 22 19:18:57 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 48min ago
Dec 22 19:18:42 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 47min ago
Dec 22 19:18:27 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 47min ago
Dec 22 19:18:12 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 47min ago
Dec 22 19:17:57 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 47min ago
Dec 22 19:17:42 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 46min ago
Dec 22 19:17:27 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 46min ago
lines 1-39
The service looks like this:
[root@rrap-0281aa system]# cat rrap_leds.service
[Unit]
Description=start LED service
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/sbin/LEDupdater.sh
[Install]
WantedBy=multi-user.target
[root@rrap-0281aa system]#
My shell script while loop looks like this:
while true ; do
# blue is wifi status
if isHostapdUp ; then
echo "default-on" > $Trigger_Blue
else
echo "none" > $Trigger_Blue
if ! isInterfacePresent wlp1s0 ; then
FAILCNT=$((FAILCNT+1))
# echo "wlp1s0 is down $FAILCNT "
fi
fi
# yellow is eth1 status
if isInterfaceDown eth1 ; then
echo "none" > $Trigger_Yellow
else
echo "default-on" > $Trigger_Yellow
fi
if [ "$FAILCNT" -gt "$MAXFAILCNT" ] ; then
echo "missing wlp1s0; rebooting " `date` >> /var/log/pciBug.log
`reboot`
fi
sleep 15
done