[arm-allstar] Power fail script

Luc Drolet VE2LUQ ldrolet at cgocable.ca
Mon Oct 22 13:26:59 EDT 2018


Oui je les bien changer

Merci
Luc


> Le 21 oct. 2018 à 21:45, Doug Crompton via ARM-allstar <arm-allstar at hamvoip.org> a écrit :
> 
> Luc,
> 
> This is basic Linux! I had the chmod statement in the original email
> announcing it.
> 
> If   chmod 755 /etc/asterisk/local/check_power_fail.sh does not work then
> the filename is wrong. CASE MATTERS! Make sure the name you saved it under
> is correct. It mus match exactly!
> 
> 
> *73 Doug*
> 
> *WA3DSP*
> 
> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
> 
> On Sun, Oct 21, 2018 at 9:12 PM Luc Drolet VE2LUQ <ldrolet at cgocable.ca>
> wrote:
> 
>> Good evening David,
>> 
>> it does not work ?
>> [root @ NODE1415 ~] # chmod 755 /etc/asterisk/local/check_power_fail.sh
>> chmod: can not access '/etc/asterisk/local/check_power_fail.sh': No such
>> file or directory
>> 
>> Luc
>> 
>> 
>> 
>> 
>>> Le 21 oct. 2018 à 19:45, David McGough <kb4fxc at inttek.net> a écrit :
>>> 
>>> 
>>> 
>>> Oops. Typo.  Try:
>>> 
>>> chmod 755 /etc/asterisk/local/check_power_fail.sh
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Sun, 21 Oct 2018, "David McGough via ARM-allstar" wrote:
>>> 
>>>> 
>>>> 
>>>> Luc,
>>>> 
>>>> Make sure the script is set executable once you've copied into the
>>>> destination folder....Like this from a bash prompt:
>>>> 
>>>> 
>>>> chmod 755 etc/asterisk/local/check_power_fail.sh
>>>> 
>>>> ...Then, try to run it.
>>>> 
>>>> 73, David KB4FXC
>>>> 
>>>> 
>>>> On Sun, 21 Oct 2018, "Luc Drolet VE2LUQ via ARM-allstar" wrote:
>>>> 
>>>>> Doug,
>>>> 
>>>> OK, I paste your script into /etc/asterisk/local/power_fail_check.sh
>>>> subsequently how to make it run?
>>>> 
>>>> I even made a reboot, and I have an error message? bash:
>> /etc/asterisk/local/check_power_fail.sh: No such file or directory
>>>> this commende I use the line 9-Start Bash shell interface
>>>> 
>>>> how to start?
>>>> 
>>>> Thank you
>>>> 
>>>> 73’s
>>>> Luc
>>>> VE2LUQ
>>>> 
>>>> 
>>>> 
>>>>> Le 21 oct. 2018 à 18:10, Doug Crompton <wa3dsp at gmail.com> a écrit :
>>>>> 
>>>>> Luc,
>>>>> 
>>>>> /etc/asterisk/local  is a good place to put it especially if you make
>> changes in it. We could put that out as a script for all and in that case
>> it would get over written in the /usr/local/sbin directory.  That is true
>> of any script you modify. You just need to call it with the full path -
>> /etc/asterisk/local/check_power_fail.sh
>>>>> 
>>>>> 73 Doug
>>>>> WA3DSP
>>>>> http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>
>>>>> 
>>>>> 
>>>>> On Sun, Oct 21, 2018 at 5:30 PM Luc Drolet VE2LUQ <ldrolet at cgocable.ca
>> <mailto:ldrolet at cgocable.ca>> wrote:
>>>>> Good evening Doug,
>>>>> 
>>>>> To put the script in our raspberry PI, can you tell us what is the
>> best place on the PI rasberry
>>>>> in /etc/asterisk/local or somewhere else?
>>>>> 
>>>>> I read your text and if I understand correctly we can change the give
>> as 5 minutes to 10 minutes for the transmission delay if there is a power
>> failure
>>>>> so if it works well in my opinion the best place will be in
>> /etc/asterisk/local?
>>>>> 
>>>>> Thank you for your execllent work
>>>>> 
>>>>> 73’s
>>>>> Luc
>>>>> VE2LUQ
>>>>> 
>>>>> 
>>>>> 
>>>>>> Le 20 oct. 2018 Ã  22:55, Doug Crompton via ARM-allstar <
>> arm-allstar at hamvoip.org <mailto:arm-allstar at hamvoip.org>> a écrit :
>>>>>> 
>>>>>> Attached is a power fail check script using the Pi GPIO. By default
>> it assumes bit 24, pin 35 of the Pi. This bit is pulled low to indicate a
>> power failure. This could be achieved by a SPDT relay or a clean 3V (no
>> more!) source powered from the mains. Of course to use this the Pi must be
>> powered from a source independent of the mains.
>>>>>> 
>>>>>> The script has a timer set to 30 seconds before it assumes a power
>> fail. It sends a "power fail set" message at start and after a power
>> failure is over.  When a power failure is happening it says "power failure"
>> on the air locally every 5 minutes.
>>>>>> 
>>>>>> Times and GPIO bits are changeable in the script.
>>>>>> 
>>>>>> The script, after checking, is run in the background and uses an
>> interrupt requiring scant resources.
>>>>>> 
>>>>>> Copy this script to your server and make it executable -  chmod 750
>> power_fail_check.sh
>>>>>> 
>>>>>> 73 Doug
>>>>>> WA3DSP
>>>>>> http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>
>>>>>> 
>>>>>> 
>>>>>> <power_fail_check.sh>_______________________________________________
>>>>>> 
>>>>>> ARM-allstar mailing list
>>>>>> ARM-allstar at hamvoip.org <mailto:ARM-allstar at hamvoip.org>
>>>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar <
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar>
>>>>>> 
>>>>>> Visit the BBB and RPi2/3 web page - http://hamvoip.org <
>> 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 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 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 web page - http://hamvoip.org



More information about the ARM-allstar mailing list