[systemd-devel] systemd and smartd daemon

Reindl Harald h.reindl at thelounge.net
Thu Apr 2 11:55:19 PDT 2015



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

-------------- 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/20150402/33e1c834/attachment.sig>


More information about the systemd-devel mailing list