wicd.initd 790 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/openrc-run
  2. # Copyright 1999-2006 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. # opts="start stop restart"
  5. WICD_DAEMON=/usr/bin/wicd
  6. WICD_PIDFILE=/run/wicd/wicd.pid
  7. depend() {
  8. need dbus
  9. after hald
  10. provide net
  11. }
  12. start() {
  13. ebegin "Starting wicd daemon"
  14. # fix Gentoo bug 296197
  15. #[ -f /etc/wicd/wired-settings.conf ] && sed -i 's/^\[\]$//' /etc/wicd/wired-settings.conf
  16. "${WICD_DAEMON}" >/dev/null 2>&1
  17. eend $?
  18. }
  19. stop() {
  20. ebegin "Stopping wicd daemon and closing connections"
  21. # can't use ssd because it needs the -k option
  22. "${WICD_DAEMON}" -k >/dev/null 2>&1
  23. eend $?
  24. }
  25. force_kill() {
  26. ebegin "Stopping wicd daemon"
  27. start-stop-daemon --stop --pidfile "${WICD_PIDFILE}"
  28. eend $?
  29. }
  30. restart() {
  31. force_kill
  32. #start
  33. sve_start
  34. }