diff options
Diffstat (limited to 'testing/wicd/wicd.initd')
-rwxr-xr-x | testing/wicd/wicd.initd | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/wicd/wicd.initd b/testing/wicd/wicd.initd new file mode 100755 index 0000000000..071f3fd52a --- /dev/null +++ b/testing/wicd/wicd.initd @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +## Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +WICD_DAEMON=/usr/sbin/wicd +WICD_PIDFILE=/var/run/wicd/wicd.pid + +depend() { + need dbus + after hald + provide net +} + +start() { + ebegin "Starting wicd daemon" + [ -f /etc/wicd/wired-settings.conf ] && sed -i 's/^\[\]$//' /etc/wicd/wired-settings.conf + "${WICD_DAEMON}" >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping wicd daemon and closing connections" + "${WICD_DAEMON}" -k >/dev/null 2>&1 + eend $? +} + +force_kill() { + ebegin "Stopping wicd daemon" + start-stop-daemon --stop --pidfile "${WICD_PIDFILE}" + eend $? +} + +restart() { + force_kill + start +} |