You are not logged in.

#1 2014-12-19 15:07:51

MilanKnizek
Member
Registered: 2005-12-13
Posts: 88

systemd unit file keys StandardError and StandardOutput are ignored

Hi,

I would like to modify the unit file of Motion so that any output of the /usr/bin/motion is suppressed do /dev/null.

[Unit]
Description=Motion daemon
After=local-fs.target
 
[Service]
ExecStart=/usr/bin/motion
Type=forking
StandardOutput=null
StandardError=null
 
[Install]
WantedBy=multi-user.target 

The above does not work:

# journalctl -fu motion
Dec 19 16:00:56 toillet motion[5747]: [1] Header not JPEG
Dec 19 16:00:56 toillet motion[5747]: [1] Header not JPEG
Dec 19 16:00:57 toillet motion[5747]: [1] Header not JPEG
Dec 19 16:00:57 toillet motion[5747]: [1] Header not JPEG
Dec 19 16:00:57 toillet motion[5747]: [1] Header not JPEG
Dec 19 16:00:58 toillet motion[5747]: [1] Header not JPEG
Dec 19 16:00:58 toillet motion[5747]: [1] Header not JPEG

Apart from systemd's journal, also the syslog-ng runs on the server. Stopping it temporarily had no effect.

Is there any other way how to make systemd ignore the messages? (/usr/bin/motion does not seem to have extra switches for some kind of "quiet" mode.)


--
Milan Knizek
http://knizek.net

Offline

#2 2014-12-19 17:56:26

intelfx
Member
From: Russia, Moscow
Registered: 2013-08-21
Posts: 12

Re: systemd unit file keys StandardError and StandardOutput are ignored

I can't reproduce the issue here.

  • Have you reloaded the configuration (systemctl daemon-reload) and restarted the unit afterwards?

  • Are you sure that this is the output from current motion's instance and not from one of the previous runs?

Offline

#3 2014-12-19 21:22:14

MilanKnizek
Member
Registered: 2005-12-13
Posts: 88

Re: systemd unit file keys StandardError and StandardOutput are ignored

I verified already earlier that there are no other "motion" processes running and reloaded daemons. Changing the ExecStart executable file name to a non-sense confirmed the particular unit file is actually used by systemctl.

EDIT: also rebooted now to make really sure.

Last edited by MilanKnizek (2014-12-19 21:26:02)


--
Milan Knizek
http://knizek.net

Offline

Board footer

Powered by FluxBB