aboutsummaryrefslogtreecommitdiffstats
path: root/testing/wicd/wicd.initd
diff options
context:
space:
mode:
authorKonstantin Khokhlov <lazychyvak@gmail.com>2017-06-10 12:54:53 +0300
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-11 17:22:30 +0000
commitb375dc18dc8bccafe490bf5c58d80543cbb53910 (patch)
treeb7f4782949068291f8ab0fd58ccefa4ce9ff2711 /testing/wicd/wicd.initd
parentd6461ea92b11d309e529c33311d6ad2beb9ae393 (diff)
downloadaports-b375dc18dc8bccafe490bf5c58d80543cbb53910.tar.bz2
aports-b375dc18dc8bccafe490bf5c58d80543cbb53910.tar.xz
testing/wicd: new aport
http://wicd.sourceforge.net/ Wicd is an open source wired and wireless network manager for Linux
Diffstat (limited to 'testing/wicd/wicd.initd')
-rwxr-xr-xtesting/wicd/wicd.initd36
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
+}