Hi, smartmontools upstream told me they already have a service file, which is true. I tweaked it a little, see [1].
So, here comes a patch for the debian packaging which enables the systemd
service file and adjusts the postinst, postrm, prerm scripts. Quote from the
commit message:
The smartd.service file will be enabled if the user enabled smartd in
/etc/default/smartmontools before.
Upon upgrades or removal, systemd will be reloaded.
After upgrading, smartd will be restarted
Please note that this does not address bug #631075, so the service file
overwrites only one of the two init scripts. As soon as that bug is
resolved, we should re-evaluate the situation. We have one of the following
possibilities:
1) /etc/init.d/smartd is installed. We have nothing to do, as
smartd.service trumps /etc/init.d/smartd.
2) /etc/init.d/smartmontools is installed. We can either rename
smartd.service to smartmontools.service, or we mask
smartmontools.service to make systemd stop using the old init script.
Best regards,
Michael
[1] https://sourceforge.net/apps/trac/smartmontools/ticket/194
0001-enable-systemd-service-file-adjust-postinst-postrm-p.patch
Description: Binary data

