#!/bin/bash

lockfile-create "/tmp/voletSomfy.lockfile"

mosquitto_pub -t "jerome.delacotte@gmail.com/chambre/volet" -m "$1"
#mosquitto_pub -h  www.maqiatto.com -u jerome.delacotte@gmail.com -P setaou -I clientId-9FG7vBimhk -t "jerome.delacotte@gmail.com/chambre/volet" -m $1
sleep 1
#mosquitto_pub -h  www.maqiatto.com -u jerome.delacotte@gmail.com -P setaou -I clientId-9FG7vBimhk -t "jerome.delacotte@gmail.com/theo/volet" -m $1
mosquitto_pub -t "jerome.delacotte@gmail.com/theo/volet" -m "$1"
sleep 1
#mosquitto_pub -h  www.maqiatto.com -u jerome.delacotte@gmail.com -P setaou -I clientId-9FG7vBimhk -t "jerome.delacotte@gmail.com/manon/volet" -m $1 
mosquitto_pub -t "jerome.delacotte@gmail.com/manon/volet" -m "$1"
lockfile-remove "/tmp/voletSomfy.lockfile"

