Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | #! /bin/sh |
| 2 | ### BEGIN INIT INFO |
| 3 | # Provides: system-tools-backends |
| 4 | # Required-Start: $local_fs dbus |
| 5 | # Required-Stop: $local_fs dbus |
| 6 | # Should-Start: $syslog |
| 7 | # Should-Stop: $syslog |
| 8 | # Default-Start: 2 3 4 5 |
| 9 | # Default-Stop: 1 |
| 10 | # Short-Description: Gnome System Tools Backends |
| 11 | # Description: The Gnome System Tools Backends daemon handles root-needed |
| 12 | # operations to configure your machine with the Gnome System |
| 13 | # Tools. |
| 14 | ### END INIT INFO |
| 15 | |
| 16 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin |
| 17 | DAEMON=/usr/bin/system-tools-backends |
| 18 | PIDDIR=/var/run |
| 19 | PIDFILE=$PIDDIR/system-tools-backends.pid |
| 20 | NAME=system-tools-backends |
| 21 | DESC="System Tools Backends" |
| 22 | |
| 23 | test -x $DAEMON || exit 0 |
| 24 | |
| 25 | set -e |
| 26 | |
| 27 | do_start() { |
| 28 | echo "Starting $DESC" |
| 29 | start-stop-daemon --start --startas $DAEMON --quiet --pidfile $PIDFILE |
| 30 | } |
| 31 | |
| 32 | do_stop() { |
| 33 | echo "Stopping $DESC" |
| 34 | start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE --startas $DAEMON |
| 35 | } |
| 36 | |
| 37 | case "$1" in |
| 38 | start) |
| 39 | do_start |
| 40 | ;; |
| 41 | stop) |
| 42 | do_stop |
| 43 | ;; |
| 44 | #reload) |
| 45 | # |
| 46 | # If the daemon can reload its config files on the fly |
| 47 | # for example by sending it SIGHUP, do it here. |
| 48 | # |
| 49 | # If the daemon responds to changes in its config file |
| 50 | # directly anyway, make this a do-nothing entry. |
| 51 | # |
| 52 | # echo "Reloading $DESC configuration files." |
| 53 | # start-stop-daemon --stop --signal 1 --quiet --pidfile \ |
| 54 | # /var/run/$NAME.pid --exec $DAEMON |
| 55 | #;; |
| 56 | restart|force-reload) |
| 57 | # |
| 58 | # If the "reload" option is implemented, move the "force-reload" |
| 59 | # option to the "reload" entry above. If not, "force-reload" is |
| 60 | # just the same as "restart". |
| 61 | # |
| 62 | do_stop |
| 63 | sleep 5 |
| 64 | do_start |
| 65 | ;; |
| 66 | *) |
| 67 | N=/etc/init.d/$NAME |
| 68 | echo "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2 |
| 69 | exit 1 |
| 70 | ;; |
| 71 | esac |
| 72 | |
| 73 | exit 0 |
| 74 | |