Compare commits

..

No commits in common. "779153122fd66af35a955a5dec627f090db349ea" and "a2d0cc09edfc2a522e3a20ee3894879df3e7256b" have entirely different histories.

4 changed files with 2 additions and 8 deletions

1
.gitignore vendored
View file

@ -1,4 +1,3 @@
venv/** venv/**
*.log *.log
.idea/** .idea/**
*.log.gz

View file

@ -73,7 +73,7 @@ def on_log(client, obj, level, string):
# but note that the client id must be unique on the broker. Leaving the client # but note that the client id must be unique on the broker. Leaving the client
# id parameter empty will generate a random id for you. # id parameter empty will generate a random id for you.
client_id = 'mqtt-client-pimirror2' client_id = 'mqtt-client-solaria'
mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2, client_id) mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2, client_id)
mqttc.on_message = on_message mqttc.on_message = on_message

View file

@ -4,7 +4,6 @@ echo
echo "$(date '+%Y%m%d%H%M%S'): restarting run-on-pi" >> /home/pi/mqtt-halt-pack/app.log echo "$(date '+%Y%m%d%H%M%S'): restarting run-on-pi" >> /home/pi/mqtt-halt-pack/app.log
killall run-on-pi.sh killall run-on-pi.sh
ps aux | grep "python client/client.py" | grep -v grep | tr -s ' ' | cut -d ' ' -f 2 | xargs kill
nohup /home/pi/mqtt-halt-pack/run-on-pi.sh >> /home/pi/mqtt-halt-pack/app.log 2>&1 & nohup /home/pi/mqtt-halt-pack/run-on-pi.sh >> /home/pi/mqtt-halt-pack/app.log 2>&1 &

View file

@ -7,10 +7,6 @@ counter=0
max_counter=120 max_counter=120
max_restart_counter=20 max_restart_counter=20
echo "$(date '+%Y%m%d%H%M%S'): Starting and waitintg 15s "
sleep 15
echo "$(date '+%Y%m%d%H%M%S'): checking connectivity" echo "$(date '+%Y%m%d%H%M%S'): checking connectivity"
while [ $(ping -q -w 3 -c 1 192.168.31.5 > /dev/null && echo 1 || echo 0) -eq 0 ]; do while [ $(ping -q -w 3 -c 1 192.168.31.5 > /dev/null && echo 1 || echo 0) -eq 0 ]; do