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
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to