Remove sudo from mmcli commands in modem scripts
This commit is contained in:
parent
e5877059ff
commit
8b52988ad2
3 changed files with 11 additions and 10 deletions
|
@ -29,12 +29,12 @@ sendmsg() {
|
|||
TEXTSIZE="$(echo "$TEXT" | wc -c)"
|
||||
|
||||
SMSNO=$(
|
||||
sudo mmcli -m $MODEM --messaging-create-sms="text='$TEXT',number=$NUMBER" |
|
||||
mmcli -m $MODEM --messaging-create-sms="text='$TEXT',number=$NUMBER" |
|
||||
grep -o [0-9]*$
|
||||
)
|
||||
sudo mmcli -s ${SMSNO} --send || err "Couldn't send text message"
|
||||
mmcli -s ${SMSNO} --send || err "Couldn't send text message"
|
||||
for i in $(mmcli -m $MODEM --messaging-list-sms | grep " (sent)" | cut -f5 -d' ') ; do
|
||||
sudo mmcli -m $MODEM --messaging-delete-sms=$i
|
||||
mmcli -m $MODEM --messaging-delete-sms=$i
|
||||
done
|
||||
|
||||
TIME="$(date --iso-8601=seconds)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue