net-dialup/dwun: use #!/sbin/openrc-run instead of #!/sbin/runscript
[gentoo.git] / net-dialup / dwun / files / dwun
1 #!/sbin/openrc-run
2 # Copyright 1999-2016 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Id$
5
6 depend() {
7         need net
8 }
9
10 DAEMON=/usr/sbin/dwun
11 PIDFILE="/run/${SVCNAME}.pid"
12
13 start() {
14         ebegin "Starting ${SVCNAME}"
15         start-stop-daemon --start --pidfile ${PIDFILE} --startas ${DAEMON}
16         eend $?
17 }
18
19 stop() {
20         ebegin "Stopping ${SVCNAME}"
21         start-stop-daemon --stop --signal 1 --pidfile ${PIDFILE}
22         eend $?
23 }