another attempt for smoother initscript integration
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 10 Mar 2015 14:42:12 +0000 (15:42 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 10 Mar 2015 14:42:12 +0000 (15:42 +0100)
sliver-systemd/vinit.service

index b9e846c..55a408d 100644 (file)
@@ -1,10 +1,17 @@
 [Unit]
-Description=User-defined initscript manager
+Description=User-defined initscript launcher
 After=network-online.target
 
+# inspired from
+# http://www.freedesktop.org/software/systemd/man/systemd.service.html
+# stoppable oneshot service
 [Service]
-Type=forking
-ExecStart=/bin/bash -c '/etc/rc.d/init.d/vinit.slice start $(cat /etc/slicename) >> /var/log/vinit 2>&1 &'
+Type=oneshot
+RemainAfterExit=yes
+#ExecStart=/bin/bash -c '/etc/rc.d/init.d/vinit.slice start $(cat /etc/slicename) 2>&1 >> /var/log/vinit &'
+#ExecStop=/bin/bash -c '/etc/rc.d/init.d/vinit.slice stop $(cat /etc/slicename) 2>&1 >> /var/log/vinit &'
+ExecStart=/usr/bin/vinit.start
+ExecStop=/usr/bin/vinit.stop
 
 [Install]
 WantedBy=multi-user.target