You are not logged in.
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
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
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