connmand-servis

This commit is contained in:
milisbir 2018-07-11 01:10:59 +02:00
parent 11c7a0d3b7
commit c4cb91e721
1 changed files with 14 additions and 8 deletions

View File

@ -1,23 +1,29 @@
#!/bin/sh
# /etc/rc.d/connamnd: start/stop connman
#
. /lib/lsb/init-functions
BIN_FILE="/usr/sbin/connmand"
BIN2_FILE="/usr/sbin/connman-vpnd"
case $1 in
start)
echo "connman başlatılıyor...."
connmand
echo "connman başlatıldı."
log_info_msg "Connman başlatılıyor...."
start_daemon $BIN_FILE --nodaemon
evaluate_retval
;;
stop)
echo "connman durduruluyor...."
killall -9 connmand
killall -9 connman-vpnd
echo "connman durduruldu."
log_info_msg "Connamn durduruluyor..."
killproc $BIN_FILE
killproc $BIN2_FILE
evaluate_retval
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
statusproc ${BIN_FILE}
;;
*)
echo "Usage: $0 [start|stop|restart]"
;;