ofono 516 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/sh
  2. DAEMON=/usr/sbin/ofonod
  3. PIDFILE=/var/run/ofonod.pid
  4. DESC="Telephony daemon"
  5. if [ -f /etc/default/ofono ] ; then
  6. . /etc/default/ofono
  7. fi
  8. set -e
  9. do_start() {
  10. $DAEMON
  11. }
  12. do_stop() {
  13. start-stop-daemon --stop --name ofonod --quiet
  14. }
  15. case "$1" in
  16. start)
  17. echo "Starting $DESC"
  18. do_start
  19. ;;
  20. stop)
  21. echo "Stopping $DESC"
  22. do_stop
  23. ;;
  24. restart|force-reload)
  25. echo "Restarting $DESC"
  26. do_stop
  27. sleep 1
  28. do_start
  29. ;;
  30. *)
  31. echo "Usage: $0 {start|stop|restart|force-reload}" >&2
  32. exit 1
  33. ;;
  34. esac
  35. exit 0