upt playbook

This commit is contained in:
jaydee
2024-07-08 23:05:25 +02:00
parent b4018dafb5
commit ed83895391

View File

@@ -1,16 +1,18 @@
#!/bin/bash #!/bin/bash
case $1 in case $1 in
"start") "start")
echo lala2 >> /tmp/mqtt_srv.log
mqtt_srv.py > /dev/null 2>&1 & 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}'` kill -9 `ps -ef|grep -e "mqtt_srv.py"|grep -v grep|awk '{ print $1}'`
;; ;;
restart) "restart")
$0 stop $0 stop
$0 start $0 start
;; ;;
status) "status")
ps -ef|grep -e "mqtt_srv.py"|grep -v grep ps -ef|grep -e "mqtt_srv.py"|grep -v grep
;; ;;
esac esac