Remplacement des espaces par des tabs
This commit is contained in:
parent
722ef11089
commit
deacaf10d1
@ -25,46 +25,46 @@ fi
|
||||
|
||||
if [[ $SMS_1_NUMBER -eq $PHONENUM ]]; then
|
||||
if [ -n "$MATCH" ] || [ "$DIFFDATE" -lt "1800" ] ; then
|
||||
case $CMD in
|
||||
allo)
|
||||
REPLY="A l'huile"
|
||||
;;
|
||||
help)
|
||||
REPLY="PING \$HOST - ping un host; UNLOCK - déverrouille pendant 30 le mode OTP; LOCK - verrouille le mode unlock; REBOOT \$HOST - redémarre l'host distant; CMD \$HOST \$COMMAND - exécute une commande sur l'host distant; PXY \$NUM \$MESSAGE - Envoie un SMS avec le module"
|
||||
;;
|
||||
ping)
|
||||
REPLY=`ping -n -c 2 $TEXT`
|
||||
;;
|
||||
unlock)
|
||||
date +%s > $PATH_UNLOCK_FILE
|
||||
REPLY="Système débloqué pour 30 min"
|
||||
;;
|
||||
lock)
|
||||
echo "0" > $PATH_UNLOCK_FILE
|
||||
REPLY="Système re-verouillé"
|
||||
;;
|
||||
reboot)
|
||||
ssh root@"$TEXT" 'sudo reboot'
|
||||
REPLY="Signal reboot envoyé"
|
||||
;;
|
||||
cmd)
|
||||
HOST=`echo $TEXT | awk '{print $1}'`
|
||||
COMMAND=`echo $TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<=NF; i++) print $i " "}'`
|
||||
REPLY=`ssh -oStrictHostKeyChecking=no root@$HOST $COMMAND`
|
||||
;;
|
||||
pxy)
|
||||
PHONENUM=`echo $TEXT | awk '{print $1}'`
|
||||
REPLY=`echo $TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<=NF; i++) print $i " "}'`
|
||||
;;
|
||||
*)
|
||||
REPLY="Commande inconnu"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
REPLY="Mauvais OTP"
|
||||
fi
|
||||
case $CMD in
|
||||
allo)
|
||||
REPLY="A l'huile"
|
||||
;;
|
||||
help)
|
||||
REPLY="PING \$HOST - ping un host; UNLOCK - déverrouille pendant 30 le mode OTP; LOCK - verrouille le mode unlock; REBOOT \$HOST - redémarre l'host distant; CMD \$HOST \$COMMAND - exécute une commande sur l'host distant; PXY \$NUM \$MESSAGE - Envoie un SMS avec le module"
|
||||
;;
|
||||
ping)
|
||||
REPLY=`ping -n -c 2 $TEXT`
|
||||
;;
|
||||
unlock)
|
||||
date +%s > $PATH_UNLOCK_FILE
|
||||
REPLY="Système débloqué pour 30 min"
|
||||
;;
|
||||
lock)
|
||||
echo "0" > $PATH_UNLOCK_FILE
|
||||
REPLY="Système re-verouillé"
|
||||
;;
|
||||
reboot)
|
||||
ssh root@"$TEXT" 'sudo reboot'
|
||||
REPLY="Signal reboot envoyé"
|
||||
;;
|
||||
cmd)
|
||||
HOST=`echo $TEXT | awk '{print $1}'`
|
||||
COMMAND=`echo $TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<=NF; i++) print $i " "}'`
|
||||
REPLY=`ssh -oStrictHostKeyChecking=no root@$HOST $COMMAND`
|
||||
;;
|
||||
pxy)
|
||||
PHONENUM=`echo $TEXT | awk '{print $1}'`
|
||||
REPLY=`echo $TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<=NF; i++) print $i " "}'`
|
||||
;;
|
||||
*)
|
||||
REPLY="Commande inconnu"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
REPLY="Mauvais OTP"
|
||||
fi
|
||||
else
|
||||
REPLY="FROM: $SMS_1_NUMBER TEXT: $SMS_1_TEXT"
|
||||
REPLY="FROM: $SMS_1_NUMBER TEXT: $SMS_1_TEXT"
|
||||
fi
|
||||
|
||||
/usr/bin/sudo /usr/bin/gammu-smsd-inject TEXT $PHONENUM -len 999 -textutf8 "$REPLY"
|
||||
|
Loading…
Reference in New Issue
Block a user