3
I have the code below:
RESPOSTA=$(asterisk -rx "sip show peers" |grep 4003 |awk -F" " '{print $6}')
if[["$RESPOSTA" == "OK"]];then
echo $RESPOSTA
elif[["$RESPOSTA" == "Unmonitored"]];then
if[["$RESPOSTA" == "(Unspecified)"]]; then
cp /dados/automatico.call /var/spool/asterisk/outgoing/
asterisk -rx reload
fi
echo $RESPOSTA
fi
but it is generating this error:
/data/status.sh: line 5: syntax error near Unexpected token
then' /dados/status.sh: line 5:
if[[["$REPLY" == "OK"]]then;'