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 #!/bin/sh
# /etc/rc.d/connamnd: start/stop connman # /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 case $1 in
start) start)
echo "connman başlatılıyor...." log_info_msg "Connman başlatılıyor...."
connmand start_daemon $BIN_FILE --nodaemon
echo "connman başlatıldı." evaluate_retval
;; ;;
stop) stop)
echo "connman durduruluyor...." log_info_msg "Connamn durduruluyor..."
killall -9 connmand killproc $BIN_FILE
killall -9 connman-vpnd killproc $BIN2_FILE
echo "connman durduruldu." evaluate_retval
;; ;;
restart) restart)
$0 stop $0 stop
sleep 2
$0 start $0 start
;; ;;
status)
statusproc ${BIN_FILE}
;;
*) *)
echo "Usage: $0 [start|stop|restart]" echo "Usage: $0 [start|stop|restart]"
;; ;;