[arm-allstar] problem running bash script

Greyeagle Thornton flgreyeagle at gmail.com
Thu Nov 1 22:30:39 EDT 2018


Hi! I guess I made it look like the end goal in my question was to run
newsline.
The goal was actually to get ANY bash script to execute from a DTMF command
on the repeater.
Two of the files mentioned are shown below:

nonews.sh
#!/bin/bash
#if newsenable file exists, delete it and exit
#if it doesn't exist, just exit
if [ -s /etc/asterisk/local/playnews/newsenable ] ;
then sleep .1
else exit 1
fi
rm /etc/asterisk/local/playnews/newsenable
exit 0

yesnews.sh
#!/bin/bash
#if newsenable file exists, just exit
#if it doesn't exist, copy dummy file to newsenable
if [ -s /etc/asterisk/local/playnews/newsenable ] ;
then exit 1
fi
cp /etc/asterisk/local/playnews/dummy
/etc/asterisk/local/playnews/newsenable
exit 0

I can manually execute these files from putty, and get the expected result.
(yesnews.sh creates the newsenable file if it's not already there,
nonews.sh deletes newsenable unless it's already gone, and playnewsline
disconnects from the East Coast reflector, keeps my two nodes connected
together, plays newsline in segments until it's done, then reconnects to
the reflector). Also, playnewsline executes as a cron job every night
except Tuesday at 9PM unless I have run nonews.sh. So everything works if I
run them manually from Putty or when the crontab does its thing.

But when I try using DTMF commands on the repeater to execute these files,
nothing happens.


More information about the ARM-allstar mailing list