mirror of
https://github.com/Ponce/slackbuilds
synced 2024-10-20 10:27:20 +02:00
34 lines
468 B
Text
34 lines
468 B
Text
|
#!/bin/sh
|
||
|
# Start/stop/restart the connman daemon.
|
||
|
|
||
|
connmand_start() {
|
||
|
if [ -x /usr/sbin/connmand ]; then
|
||
|
echo "Starting connman daemon: /usr/sbin/connmand "
|
||
|
/usr/sbin/connmand
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
connmand_stop() {
|
||
|
killall connmand 2> /dev/null
|
||
|
}
|
||
|
|
||
|
connmand_restart() {
|
||
|
connmand_stop
|
||
|
sleep 1
|
||
|
connmand_start
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
'start')
|
||
|
connmand_start
|
||
|
;;
|
||
|
'stop')
|
||
|
connmand_stop
|
||
|
;;
|
||
|
'restart')
|
||
|
connmand_restart
|
||
|
;;
|
||
|
*)
|
||
|
echo "usage $0 start|stop|restart"
|
||
|
esac
|