diff --git a/mqtt_srv.sh b/mqtt_srv.sh index cc44635..603c9fc 100644 --- a/mqtt_srv.sh +++ b/mqtt_srv.sh @@ -1,16 +1,18 @@ #!/bin/bash case $1 in "start") +echo lala2 >> /tmp/mqtt_srv.log mqtt_srv.py > /dev/null 2>&1 & ;; -stop) +"stop") +echo lala1 >> /tmp/mqtt_srv.log kill -9 `ps -ef|grep -e "mqtt_srv.py"|grep -v grep|awk '{ print $1}'` ;; -restart) +"restart") $0 stop $0 start ;; -status) +"status") ps -ef|grep -e "mqtt_srv.py"|grep -v grep ;; esac \ No newline at end of file