diff options
author | Chris Xiong <chirs241097@gmail.com> | 2018-04-10 09:27:22 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2018-04-10 09:27:22 +0800 |
commit | dd96de7379d68659eed8b4c795da1e4b57d3e734 (patch) | |
tree | 9a5cad0c413402bb2fdde627f9dc81f29ee1f371 /lightsd.openrc | |
parent | 6bdb9028af9a5256fbb47b942843e49aef7e3aa1 (diff) | |
download | lightsd-dd96de7379d68659eed8b4c795da1e4b57d3e734.tar.xz |
Hopefully fixed some segmentation faults.
Added init script for OpenRC.
Fixed compiler warnings.
Diffstat (limited to 'lightsd.openrc')
-rwxr-xr-x | lightsd.openrc | 18 |
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 $? +} |