[arm-allstar] Help with Script
Doug Crompton
wa3dsp at gmail.com
Tue Apr 14 13:42:27 EDT 2020
Darrell,
A much easier way would be to just use common names for the message or
messages in the tail command... like /tmp/message1, /tmp/message2 etc.
The tail command will ignore empty or non-existent files. The you can
populate the files as need to create the desired messages and no changes to
rpt.conf is needed. Alerts should always have priority.
Dave and I have talked about the tail message and telemetry in general and
an update to it is on the agenda. What I do on a local repeater here is
leave the tail message strictly for alerts and then post messages at
specific time like 15 and 45 after the hour with crons.
Personally I would not constantly change the rpt file and reload it. I have
seen that occasionally cause crashes.
*73 Doug, WA3DSP*
*http://wa3dsp.org <http://wa3dsp.org>*
On Tue, Apr 14, 2020 at 1:05 PM Darrell Black <gigahacker at gmail.com> wrote:
> Hi Doug, I have two functions that can be called by DTMF to run scripts.
> One to put the repeater in normal mode and one to put it in skywarm mode.
>
> The normal mode has many tail messages and plays crontab scheduled
> announcements. During a skywarn net I want to shut off all scheduled
> announcements, all tail messages (except a warning) and also change the
> reset tone to "SW" for skywarn.
>
> So when I type in the *xx right now the crontab is swapped, the rpt file
> is swapped but the reset tone does not change. Do I need to restart
> asterisk instead of just reloading the file for the tone to change?
>
> On Tue, Apr 14, 2020 at 12:55 PM "Doug Crompton via ARM-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
>> Darrell,
>>
>> What is the object of this script. It seems a little convoluted to me.
>> What is it you want to do with alerts? Why the crontab statement and why
>> the constant reloading of rpt.conf? This is not a recommended way to do
>> things.
>>
>> *73 Doug, WA3DSP*
>> *http://wa3dsp.org <http://wa3dsp.org>*
>>
>> On Tue, Apr 14, 2020 at 10:36 AM "Darrell Black via ARM-allstar" <
>> arm-allstar at hamvoip.org> wrote:
>>
>> > I know this has been answered 1000's times but it just does not seem to
>> > work for me. Below is my simple script.
>> >
>> > #!/bin/bash
>> > crontab /etc/asterisk/local/cron_skywarn.txt
>> > \cp -f /etc/asterisk/rpt_skywarn.conf /etc/asterisk/rpt.conf
>> > sleep 1
>> > sudo asterisk -rx "rpt reload"
>> > sleep 5
>> > sudo asterisk -rx "rpt localplay 50165 /etc/asterisk/sounds/wx"
>> >
>> >
>> > I have verified that the crontab is replaced and that works
>> > I have verified that the rpt.conf is replaced with the new file
>> >
>> > What is not happening is I do not think the rpt.conf is being read in.
>> >
>> > The file is replaced however the CT does not change. I have the
>> following:
>> > NORMAL
>> >
>> > ; COURTESY TONE MAPPING
>> > unlinkedct=ct1
>> > remotect=ct3
>> > linkunkeyct=ct8
>> >
>> > SKYWARN
>> >
>> > unlinkedct=ct5
>> > remotect=ct5
>> > linkunkeyct=ct5
>> >
>> > ct5 = iSW
>> >
>> > ct5 is never used.....Note the repeater is ALWAYs linked to a hub.
>> >
>> > Any help please
>> > --
>> >
>> > Darrell Black
>> >
>> > (517) 917-2226
>> > GigaHacker at gmail.com
>> > http://www.linkedin.com/in/darrellblack
>> >
>> >
>> > 73 de W8DSB
>> > "In God we trust, all others we monitor"
>> >
>> > GMRS WRDE739
>> > _______________________________________________
>> >
>> > ARM-allstar mailing list
>> > ARM-allstar at hamvoip.org
>> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>> >
>> > Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>> >
>> _______________________________________________
>>
>> ARM-allstar mailing list
>> ARM-allstar at hamvoip.org
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>
>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>
>
>
> --
>
> Darrell Black
>
> (517) 917-2226
> GigaHacker at gmail.com
> http://www.linkedin.com/in/darrellblack
>
>
> 73 de W8DSB
> "In God we trust, all others we monitor"
>
> GMRS WRDE739
>
More information about the ARM-allstar
mailing list