diff options
Diffstat (limited to 'recipes/connman/files')
-rwxr-xr-x | recipes/connman/files/shr/connman | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes/connman/files/shr/connman b/recipes/connman/files/shr/connman new file mode 100755 index 0000000000..708b1b4cd1 --- /dev/null +++ b/recipes/connman/files/shr/connman @@ -0,0 +1,42 @@ +#!/bin/sh + +DAEMON="/usr/sbin/connmand -I usb0" +PIDFILE=/var/run/connmand.pid +DESC="Connection Manager" + +if [ -f /etc/default/connman ] ; then + . /etc/default/connman +fi + +set -e + +do_start() { + $DAEMON +} + +do_stop() { + start-stop-daemon --stop --name connmand --quiet +} + +case "$1" in + start) + echo "Starting $DESC" + do_start + ;; + stop) + echo "Stopping $DESC" + do_stop + ;; + restart|force-reload) + echo "Restarting $DESC" + do_stop + sleep 1 + do_start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 |