Am 02.04.2015 um 20:49 schrieb Al Lau:
As a test, the "/usr/sbin/smartd $smartd_opts" is invoked from the
command line and the daemon is forked and stayed up as expected.  By
default, the /usr/sbin/smartd daemonize.

# cat /etc/sysconfig/smartmontools
smartd_opts="--interval=3600 --configfile=/etc/smartd.conf"

From the /var/log/messages, the SIGTERM signal is sent to the forked
process.  Like to know if this is something that can be worked around

as already said: just use Type=simple

[root@srv-rhsoft:~]$ systemctl status smartd.service
● smartd.service - Self Monitoring and Reporting Technology (SMART) Daemon
   Loaded: loaded (/usr/lib/systemd/system/smartd.service; enabled)
   Active: active (running) since Fr 2015-03-27 10:14:58 CET; 6 days ago
 Main PID: 812 (smartd)
   CGroup: /system.slice/smartd.service
           └─812 /usr/sbin/smartd -n -q never

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[root@srv-rhsoft:~]$ cat /usr/lib/systemd/system/smartd.service
[Unit]
Description=Self Monitoring and Reporting Technology (SMART) Daemon
After=syslog.target

[Service]
EnvironmentFile=-/etc/sysconfig/smartmontools
ExecStart=/usr/sbin/smartd -n $smartd_opts
ExecReload=/bin/kill -HUP $MAINPID
StandardOutput=syslog

[Install]
WantedBy=multi-user.target
[root@srv-rhsoft:~]$ cat /etc/sysconfig/smartmontools
# command line options for smartd
smartd_opts="-q never"
# autogenerated config file options
# smartd_conf_opts="-H -m root"

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to