File: connman.in

package info (click to toggle)
connman 0.48%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,568 kB
  • ctags: 2,951
  • sloc: ansic: 26,761; python: 923; makefile: 261; xml: 118; sh: 113
file content (46 lines) | stat: -rw-r--r-- 700 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh

DAEMON=@prefix@/sbin/connmand
DESC="Connection Manager"

. /lib/lsb/init-functions

if [ -f @sysconfdir@/default/connman ] ; then
	. @sysconfdir@/default/connman
fi

set -e

do_start() {
	start-stop-daemon --start --oknodo --exec $DAEMON -- $DAEMON_OPTS
}

do_stop() {
	start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
}

case "$1" in
  start)
	log_daemon_msg "Starting $DESC"
	do_start
	log_end_msg $?
	;;
  stop)
	log_daemon_msg "Stopping $DESC"
	do_stop
	log_end_msg $?
	;;
  restart|force-reload)
	log_daemon_msg "Restarting $DESC"
	do_stop
	sleep 1
	do_start
	log_end_msg $?
	;;
  *)
	log_success_msg "Usage: $0 {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0