-
-
Save artixnous/c25df01453edac85feecbd67709c42c2 to your computer and use it in GitHub Desktop.
/etc/init.d/wicd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/openrc-run | |
# Copyright 1999-2006 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# opts="start stop restart" | |
WICD_DAEMON=/usr/bin/wicd | |
WICD_PIDFILE=/run/wicd/wicd.pid | |
depend() { | |
need dbus | |
after hald | |
provide net | |
} | |
start() { | |
ebegin "Starting wicd daemon" | |
# fix Gentoo bug 296197 | |
#[ -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" | |
# can't use ssd because it needs the -k option | |
"${WICD_DAEMON}" -k >/dev/null 2>&1 | |
pkill -9 -f wicd-daemon.py | |
pkill -9 -f wicd/daemon/monitor.py | |
rm -f /run/openrc/started/wicd ${WICD_PIDFILE} | |
eend $? | |
} | |
force_kill() { | |
ebegin "Stopping wicd daemon" | |
start-stop-daemon --stop --pidfile "${WICD_PIDFILE}" | |
pkill -9 -f wicd-daemon.py | |
pkill -9 -f wicd/daemon/monitor.py | |
rm -f /run/openrc/started/wicd ${WICD_PIDFILE} | |
eend $? | |
} | |
restart() { | |
force_kill | |
start | |
#sve_start | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment