aboutsummaryrefslogtreecommitdiff
path: root/lightsd.openrc
diff options
context:
space:
mode:
Diffstat (limited to 'lightsd.openrc')
-rwxr-xr-xlightsd.openrc18
1 files changed, 18 insertions, 0 deletions
diff --git a/lightsd.openrc b/lightsd.openrc
new file mode 100755
index 0000000..2d1e0d7
--- /dev/null
+++ b/lightsd.openrc
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+#init script of lightsd for OpenRC
+depend()
+{
+ need sysfs dev-mount
+}
+start()
+{
+ ebegin "Starting lightsd"
+ start-stop-daemon -S -b -m -p /run/lightsd.pid -x /usr/bin/lightsd
+ eend $?
+}
+stop()
+{
+ ebegin "Stopping lightsd"
+ start-stop-daemon -s SIGTERM -p /run/lightsd.pid -x /usr/bin/lightsd
+ eend $?
+}