[systemd-devel] "StandardOutput=console" don't work as expected

Reindl Harald h.reindl at thelounge.net
Tue Dec 29 16:26:23 PST 2015


why is there only logging instead "TEST" written to the terminal 
starting a oneshot-service or in case it's a entry in /etc/crontab 
triggering a cronmail becaus the output?

that's not helpful when try to migrate cronjobs to systemd-units for 
using ReadOnlyDirectory and other security otpions

[Service]
Type=oneshot
ExecStart=/usr/bin/echo TEST
StandardOutput=syslog+console
StandardError=inherit
__________________________________

[root at srv-rhsoft:~]$ > messages
[root at srv-rhsoft:~]$ cat messages
[root at srv-rhsoft:~]$ systemctl start contentlounge-podcast.service
[root at srv-rhsoft:~]$ cat messages
Dec 30 01:25:52 srv-rhsoft systemd: Starting ContentLounge Podcast 
Cronjob...
Dec 30 01:25:53 srv-rhsoft echo: TEST
Dec 30 01:25:53 srv-rhsoft systemd: Started ContentLounge Podcast Cronjob.
[root at srv-rhsoft:~]$

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151230/f1750dec/attachment.sig>


More information about the systemd-devel mailing list