[systemd-devel] simple service shell script filling journal

Larry Harmon lharmon at turningtechnologies.com
Mon Dec 29 12:16:10 PST 2014


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?

I have tried different service types (fork, oneshot) as well as an intermediate shell script which starts the real script, no luck!




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 at 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




My shell script while loop looks something 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


Larry Harmon

Larry Harmon | Sr. Embedded Engineer

Turning Technologies | 255 West Federal Street | Youngstown, OH 44503
Direct: 330-531-7664 | Main: 330-746-3015 | Toll Free: 866-746-3015 | SKYPE larry.harmon54
lharmon at turningtechnologies.com<mailto:lharmon at turningtechnologies.com> | www.TurningTechnologies.com<http://www.turningtechnologies.com/>

 [cid:image001.png at 01CE9E4C.2D88DB90]

Stay Connected - @TurningTech <https://twitter.com/turningtech> * Facebook<http://www.facebook.com/#!/pages/Turning-Technologies/104796086230111?ref=ts>

This e-mail message, including any attached files, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient or you wish to discontinue receiving any future e-mails from the vendor featured in this message, please send an e-mail request<mailto:info at turningtechnologies.com?subject=unsubscribe>.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141229/b79bfb7c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 7539 bytes
Desc: image001.png
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141229/b79bfb7c/attachment.png>


More information about the systemd-devel mailing list