blob: 704c36dbf4b33a0ded5bab5e5e2c2a4f6b569c0b [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001#! /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
16PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
17DAEMON=/usr/bin/system-tools-backends
18PIDDIR=/var/run
19PIDFILE=$PIDDIR/system-tools-backends.pid
20NAME=system-tools-backends
21DESC="System Tools Backends"
22
23test -x $DAEMON || exit 0
24
25set -e
26
27do_start() {
28 echo "Starting $DESC"
29 start-stop-daemon --start --startas $DAEMON --quiet --pidfile $PIDFILE
30}
31
32do_stop() {
33 echo "Stopping $DESC"
34 start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE --startas $DAEMON
35}
36
37case "$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 ;;
71esac
72
73exit 0
74