add init script for OpenRC
This commit is contained in:
parent
955aeb64b7
commit
71910fa888
32
contrib/yasnd.openrc
Executable file
32
contrib/yasnd.openrc
Executable file
@ -0,0 +1,32 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright (c) 2011 Serget Popov <admin@pinkbyte.ru>
|
||||
# All rights reserved. Released under the 2-clause BSD license.
|
||||
|
||||
extra_started_commands="reload"
|
||||
description="Yet Another Stupid Network Daemon"
|
||||
description_reload="Reloads daemon configuration"
|
||||
|
||||
depend()
|
||||
{
|
||||
need net logger
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
ebegin "Starting yasnd"
|
||||
start-stop-daemon --start --background --quiet --make-pidfile --pidfile /var/run/yasnd.pid --exec /sbin/yasnd
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
ebegin "Stopping yasnd"
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/yasnd.pid
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading yasnd configuration"
|
||||
start-stop-daemon --signal HUP --pidfile /var/run/yasnd.pid
|
||||
eend $?
|
||||
}
|
Loading…
Reference in New Issue
Block a user