mirror of
https://gitlab.sectorq.eu/jaydee/mqtt_srv.git
synced 2025-12-14 18:44:53 +01:00
upt playbook
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user