[systemd-devel] Restarting service does not work

Cecil Westerhof cldwesterhof at gmail.com
Sun Dec 21 04:24:16 PST 2014


I have a service in which I log vmstat info in a H2 database. Of-course
this is only useful when H2 is actually running. So I have the following
service file:

    [Unit]
    Description=Logging vmstat to H2 Database
    Requires=h2.service
    After=h2.service

    [Service]
    Type=simple
    ExecStart=/home/cecil/bin/vmstatLog.sh
    Restart=always
    User=cecil

    [Install]
    WantedBy=multi-user.target

​It works insofar that when h2 stops, vmstatLog also stops. But when h2 is
started again, vmstatLog does not start and needs to be started manually.
What am I doing wrong?​

-- 
Cecil Westerhof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141221/0c0acb9e/attachment.html>


More information about the systemd-devel mailing list