<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Got the script to reboot working...<br>
<br>
My next question...how do I activate the PTT using a DMK URI FOB
pin 1 using a "cop" command?<br>
<br>
I know it must be a: asterisk -rx "rpt cmd 2000 cop 62,GPIO1=1
0" or something similar, but I can't figure out what GPIO the PTT
line is (I think it's GPIO1) or if there is another way to do it.<br>
<br>
The reason for this is that I would like to write custom scripts
to announce things like my IP address, my wireless SSID name, etc
by using DTMF commands via Allstar.<br>
<br>
Thanks.<br>
<br>
<br>
On 7/22/2014 5:19 AM, <a class="moz-txt-link-abbreviated" href="mailto:mike@midnighteng.com">mike@midnighteng.com</a> wrote:<br>
</div>
<blockquote
cite="mid:20140722021940.71befee5dbd13c5325dd1a521b4e73ee.be4e88ba86.wbe@email06.secureserver.net"
type="cite"><span style="font-family:Verdana; color:#000000;
font-size:10pt;">
<div><br>
</div>
<div><br>
</div>
<div>Bob,</div>
<div><br>
</div>
<div>Sorry only a short time for reply...</div>
<div><br>
</div>
<div>make a file with nano,vi or whatever and call it <a
moz-do-not-send="true" href="http://shutdowncmd.sh">shutdowncmd.sh</a></div>
<div><br>
</div>
<div>place the commands in it you use to shutdown the machine</div>
<div>ex: shutdown -P NOW</div>
<div><br>
</div>
<div>change attributes to 755 and place in usr/local/sbin/ </div>
<div><br>
</div>
<div>create a command that matches no other in your rpt.conf
node stanza (use 5 or more digits)<br>
</div>
<div>xxxx=CMD,/usr/local/sbin/<a moz-do-not-send="true"
href="http://shutdowncmd.sh">shutdowncmd.sh</a> </div>
<div><br>
</div>
<div>test your script file by running it from the command line
once... <a moz-do-not-send="true"
href="http://shutdowncmd.sh">shutdowncmd.sh</a><br>
</div>
<div><br>
</div>
<div>to call the script, enter dtmf xxxx or use in a macro to do
many things during a shutdown.</div>
<div><br>
</div>
<div>Hopefully, I did not leave anything out... 73<br>
</div>
<div><br>
</div>
<div>...mike/kb8jnm</div>
<div><br>
</div>
<div><br>
</div>
<blockquote id="replyBlockquote" webmail="1" style="border-left:
2px solid blue; margin-left: 8px; padding-left: 8px;
font-size:10pt; color:black; font-family:verdana;">
<div id="wmQuoteWrapper">
-------- Original Message --------<br>
Subject: Re: [App_rpt-users] additional-
app_rpt_script_execution<br>
From: "(KP4TR)Ramon Gonzalez" <<a moz-do-not-send="true"
href="mailto:kp4tr.ramon@gmail.com">kp4tr.ramon@gmail.com</a>><br>
Date: Mon, July 21, 2014 11:43 pm<br>
To: <a moz-do-not-send="true"
href="mailto:App_rpt-users@ohnosec.org">App_rpt-users@ohnosec.org</a><br>
<br>
<div class="moz-cite-prefix">Hello,<br>
<br>
I would like to write a macro to perform a shutdown of my
server using a DTMF command. Basically I want to run a
shell script from a function using a macro. Can someone
point me to some documentation on how this can be
accomplished?<br>
<br>
<br>
Thanks.<br>
<br>
<br>
On 3/9/2014 1:11 PM, Bob wrote:<br>
</div>
<blockquote
cite="mid:4B8050171A2C457D84B463CB079AB991@ThePykesHP"
type="cite">
<!--[if !mso]> <style>
#wmQuoteWrapper v\:* {behavior:url(#default#VML);}
#wmQuoteWrapper o\:* {behavior:url(#default#VML);}
#wmQuoteWrapper w\:* {behavior:url(#default#VML);}
#wmQuoteWrapper .shape {behavior:url(#default#VML);}
</style> <![endif]-->
<style>
#wmQuoteWrapper /* Font Definitions */ @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;}
#wmQuoteWrapper @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4;}
#wmQuoteWrapper @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}
#wmQuoteWrapper /* Style Definitions */ p.MsoNormal, #wmQuoteWrapper li.MsoNormal, #wmQuoteWrapper div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";}
#wmQuoteWrapper p.MsoPlainText, #wmQuoteWrapper li.MsoPlainText, #wmQuoteWrapper div.MsoPlainText {margin:0in; margin-bottom:.0001pt; font-size:10.0pt; font-family:"Courier New";}
#wmQuoteWrapper span.EmailStyle18 {mso-style-type:personal; font-family:Arial; color:navy;}
#wmQuoteWrapper span.EmailStyle19 {mso-style-type:personal-reply; font-family:Arial; color:navy;}
#wmQuoteWrapper @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;}
#wmQuoteWrapper div.Section1 {page:Section1;}
</style>
<div class="Section1">
<div class="MsoNormal" style="font-size:12pt;"><font
color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">Doug, Mike,
Bryan... thanks all... need to read more about
cron... each set, as well as the combined comments
helped me tremendously. I copied them here so I
can keep them together.<o:p></o:p></span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">Thanks much!<o:p></o:p></span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">Bob<o:p></o:p></span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">kk6ecm<o:p></o:p></span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">-----Original
Message-----<br>
From: <a moz-do-not-send="true" target="_blank"
class="moz-txt-link-abbreviated"
href="mailto:app_rpt-users-bounces@ohnosec.org">app_rpt-users-bounces@ohnosec.org</a>
[<a moz-do-not-send="true" target="_blank"
class="moz-txt-link-freetext"
href="mailto:app_rpt-users-bounces@ohnosec.org">mailto:app_rpt-users-bounces@ohnosec.org</a>]
On Behalf Of Bryan D. Boyle<br>
Sent: Sunday, March 09, 2014 9:30 AM<br>
To: app_rpt mailing list<br>
Subject: Re: [App_rpt-users] app_rpt script
execution<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">Read up on
the 'cron' command.<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">Use
asterisk to do what asterisk does (interface and
manage the radios).<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">Use the
operating system to do what operating systems do
(download<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">files,
manage network connections, disk I/O, etc.)<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">Write a
shell script that downloads the file on a regular
schedule and<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">save the
mp3 or wav or whathaveyou file to disk (wget/curl
is your friend).<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">Write a
shell script to play the script, assign it to a
dtmf command in<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">rpt.conf<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">use the
schedule stanza inside asterisk to execute the
dtmf command you<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">assigned to
the shell script at the requisite time.<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">Again, use
asterisk to do what aterisk does.<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">Use the OS
to do what it's supposed to do.<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt">Simplifies
things immensely.<o:p></o:p></span></font></div>
<div class="MsoPlainText"><font face="Courier New"
size="2"><span style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></div>
<div class="MsoNormal"
style="font-size:12pt;text-align:center"
align="center"><font face="Times New Roman" size="2"><span
style="font-size:10.0pt">
<hr tabindex="-1" align="center" size="2"
width="100%"> </span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><b><font
face="Tahoma" size="2"><span
style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font
face="Tahoma" size="2"><span
style="font-size:10.0pt;font-family:Tahoma"> <a
moz-do-not-send="true" target="_blank"
class="moz-txt-link-abbreviated"
href="mailto:hotmail_97fc649978f54bf0@live.com">hotmail_97fc649978f54bf0@live.com</a>
[<a moz-do-not-send="true" target="_blank"
class="moz-txt-link-freetext"
href="mailto:hotmail_97fc649978f54bf0@live.com">mailto:hotmail_97fc649978f54bf0@live.com</a>]
<b><span style="font-weight:bold">On Behalf Of </span></b>Doug
Crompton<br>
<b><span style="font-weight:bold">Sent:</span></b>
Sunday, March 09, 2014 9:44 AM<br>
<b><span style="font-weight:bold">To:</span></b>
Bob<br>
<b><span style="font-weight:bold">Cc:</span></b> <a
moz-do-not-send="true" target="_blank"
class="moz-txt-link-abbreviated"
href="mailto:app_rpt-users@ohnosec.org">app_rpt-users@ohnosec.org</a><br>
<b><span style="font-weight:bold">Subject:</span></b>
RE: [App_rpt-users] app_rpt script execution</span></font><font
size="2"><span style="font-size:10.0pt"><o:p></o:p></span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><font
face="Times New Roman" size="2"><span
style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div class="MsoNormal"
style="font-size:12pt;margin-bottom:12.0pt"><font
face="Tahoma" size="2"><span
style="font-size:10.0pt;font-family:Tahoma">Bob,<br>
<br>
The easiest way to execute scripts that command
app_rpt is outside of rpt.conf in this way....<br>
<br>
Create a script and store it somewhere (example) -<br>
<br>
#! /bin/bash<br>
/usr/sbin/asterisk -rx "rpt fun 27225 *7128190"<br>
sleep 10<br>
/usr/sbin/asterisk -rx "rpt fun 27225 *7327133"<br>
<br>
I call this script alaska_connect and it is in
/etc/asterisk/wa3dsp Make sure it s executable -
chmod 750 <filename><br>
<br>
Then create a cron job to tell when to execute it
-<br>
<br>
44 12 * * 1-6 /etc/asterisk/wa3dsp/alaska_connect<br>
<br>
This says execute
/etc/asterisk/wa3dsp/alaska_connect at 12:44 (PM
the clock is 24 hour) on Monday through Saturday<br>
<br>
Use crontab -e to edit cron or crontab -l to
list what is there. Google cron or crontab to see
cron options.<br>
<br>
As you can see this has nothing to do with
anything inside of rpt.conf Remove any scheduled
jobs in rpt.conf especially if they conflict with
doing it in this way externally.<br>
<br>
The script can be any system command or anything
you could do from the command prompt, download a
file, reboot the system, send commands to app_rpt,
restart asterisk, whatever.<br>
<br>
</span></font><b><font face="Calibri" size="2"><span
style="font-size:10.0pt;
font-family:Calibri;font-weight:bold">73 Doug<br>
WA3DSP<br>
<a moz-do-not-send="true" target="_blank"
class="moz-txt-link-freetext"
href="http://www.crompton.com/hamradio">http://www.crompton.com/hamradio</a></span></font></b><font
face="Calibri" size="2"><span
style="font-size:10.0pt;font-family:Calibri"><br>
<br>
<o:p></o:p></span></font></div>
<div>
<div class="MsoNormal"
style="font-size:12pt;text-align:center"
align="center"><font face="Times New Roman" size="2"><span
style="font-size:10.0pt">
<hr tabindex="-1" align="center" size="2"
width="100%"> </span></font></div>
<div class="MsoNormal" style="font-size:12pt;"><b><font
face="Tahoma" size="2"><span
style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font
face="Tahoma" size="2"><span
style="font-size:10.0pt;font-family:Tahoma"> <a
moz-do-not-send="true" target="_blank"
class="moz-txt-link-abbreviated"
href="mailto:app_rpt-users-bounces@ohnosec.org">app_rpt-users-bounces@ohnosec.org</a>
[<a moz-do-not-send="true" target="_blank"
class="moz-txt-link-freetext"
href="mailto:app_rpt-users-bounces@ohnosec.org">mailto:app_rpt-users-bounces@ohnosec.org</a>]
<b><span style="font-weight:bold">On Behalf Of </span></b><a
moz-do-not-send="true" target="_blank"
class="moz-txt-link-abbreviated"
href="mailto:mike@midnighteng.com">mike@midnighteng.com</a><br>
<b><span style="font-weight:bold">Sent:</span></b>
Sunday, March 09, 2014 9:48 AM<br>
<b><span style="font-weight:bold">To:</span></b>
<a moz-do-not-send="true" target="_blank"
class="moz-txt-link-abbreviated"
href="mailto:app_rpt-users@ohnosec.org">app_rpt-users@ohnosec.org</a><br>
<b><span style="font-weight:bold">Subject:</span></b>
Re: [App_rpt-users] additional-
app_rpt_script_execution</span></font><font
size="2"><span style="font-size:10.0pt"><o:p></o:p></span></font></div>
</div>
<div class="MsoNormal" style="font-size:12pt;"><font
face="Times New Roman" size="2"><span
style="font-size: 10.0pt"><o:p> </o:p></span></font></div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><br>
Some additional here bob...<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">I
did not read you message properly the first
time.<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">If
you are not sure where your script is running
from (like you installed something and do not
understand how it works) , it is probably being
executed from the system cron. /etc/crontab (do
not edit this file with a "windows" based
editor)<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">It
is probably calling a script file that you will
have to look in crontab to find what and where
it is.<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">So
if you are trying to change that to the app_rpt
system sched/macro, you will need to remove it
from crontab first.<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">Here
is some info on using the app_rpt macro/sched<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><a
target="_blank" moz-do-not-send="true"
href="http://ohnosec.org/drupal/node/143"><font
color="black"><span style="color:windowtext">http://ohnosec.org/drupal/node/143</span></font></a><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><a
target="_blank" moz-do-not-send="true"
href="http://themidnightengineer.com/category/ham-amateur-radio/app_rpt/macros-scheduler"><font
color="black"><span style="color:windowtext">http://themidnightengineer.com/category/ham-amateur-radio/app_rpt/macros-scheduler</span></font></a>/<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">...mike/kb8jnm<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<blockquote style="border:none;border-left:solid blue
1.5pt;padding:0in 0in 0in 6.0pt;
margin-left:6.0pt;margin-top:5.0pt;margin-bottom:5.0pt"
id="replyBlockquote" webmail="1">
<div id="wmQuoteWrapper">
<div class="MsoNormal"
style="font-size:12pt;margin-bottom:12.0pt"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">--------
Original Message --------<br>
Subject: Re: [App_rpt-users]
app_rpt_script_execution<br>
From: <<a target="_blank"
moz-do-not-send="true"
href="mailto:mike@midnighteng.com"><font
color="black"><span
style="color:windowtext">mike@midnighteng.com</span></font></a>><br>
Date: Sun, March 09, 2014 12:25 pm<br>
To: <a target="_blank" moz-do-not-send="true"
href="mailto:app_rpt-users@ohnosec.org"><font
color="black"><span
style="color:windowtext">app_rpt-users@ohnosec.org</span></font></a><o:p></o:p></span></font></div>
<div>
<div class="MsoNormal"
style="font-size:12pt;margin-bottom:12.0pt"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">Bob,<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">Without
knowing the exact nature, I can give some
advice on this as I do run scripts from the
app_rpt sched over the use of system cron
and there are good and bad doing it that
way.<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">But
here is some guidance...<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">You
can put the scripts in the /etc/asterisk
folder (I use /etc/asterisk/scripts ) but
you need to make sure you set file
permissions to say 755 on the script file
and be sure to call them specifically from
their location or set a path to your
directory. <o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">Also
note that any item you call in the script
would have the same permission/path problem
so do not assume you can run a file/command
(as you would from "root" command line)
without saying where it is with a path to it
in the command line. And having the
permissions set to run it.<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">If
you are trying to keep security on files,
you might run them as user: "asterisk". <o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">Hope
that is of some value...<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">...mike/kb8jnm<o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<div>
<div class="MsoNormal" style="font-size:12pt;"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black"><o:p> </o:p></span></font></div>
</div>
<blockquote style="border:none;border-left:solid
blue 1.5pt;padding:0in 0in 0in 6.0pt;
margin-left:6.0pt;margin-top:5.0pt;margin-bottom:5.0pt"
id="replyBlockquote" webmail="1">
<div id="wmQuoteWrapper">
<div class="MsoNormal"
style="font-size:12pt;margin-bottom:12.0pt"><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;color:black">--------
Original Message --------<br>
Subject: [App_rpt-users] app_rpt script
execution<br>
From: "Bob" <<a moz-do-not-send="true"
href="mailto:kk6ecm@gmail.com"
target="_blank"><font color="black"><span
style="color:windowtext">kk6ecm@gmail.com</span></font></a>><br>
Date: Sun, March 09, 2014 12:08 pm<br>
To: <<a moz-do-not-send="true"
href="mailto:app_rpt-users@ohnosec.org"
target="_blank"><font color="black"><span
style="color:windowtext">app_rpt-users@ohnosec.org</span></font></a>><o:p></o:p></span></font></div>
<div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">I’m
working on a node that downloads a
file from the internet weekly, but the
time seems to vary. I want to change
this to a specific day and time each
week, but cannot determine what is
activating the script. The script is
located in /etc/asterisk/. rpt.conf
uses the file per its [schedule]
stanza. I have two questions:<u1:p></u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy"><u1:p> </u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">Does
the server only load/execute files in
/etc/asterisk each time asterisk is
started?<u1:p></u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">How
can I setup the system so it executes
this script at a given time each week?
<u1:p></u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy"><u1:p> </u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">Thanks,<u1:p></u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">Bob<u1:p></u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">kk6ecm<u1:p></u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
<div>
<div class="MsoNormal"
style="font-size:12pt;"><font color="navy"
face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy"><u1:p> </u1:p></span></font><font
color="black" face="Verdana" size="2"><span
style="font-size:10.0pt;font-family:Verdana;
color:black"><o:p></o:p></span></font></div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
App_rpt-users mailing list
<a moz-do-not-send="true" target="_blank" class="moz-txt-link-abbreviated" href="mailto:App_rpt-users@ohnosec.org">App_rpt-users@ohnosec.org</a>
<a moz-do-not-send="true" target="_blank" class="moz-txt-link-freetext" href="http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users">http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users</a>
To unsubscribe from this list please visit <a moz-do-not-send="true" target="_blank" class="moz-txt-link-freetext" href="http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users">http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users</a> and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"
You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem. </pre>
</blockquote>
<br>
<hr>_______________________________________________<br>
App_rpt-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:App_rpt-users@ohnosec.org">App_rpt-users@ohnosec.org</a><br>
<a moz-do-not-send="true"
href="http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users">http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users</a><br>
<br>
To unsubscribe from this list please visit <a
moz-do-not-send="true"
href="http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users">http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users</a>
and scroll down to the bottom of the page. Enter your email
address and press the "Unsubscribe or edit options button"<br>
You do not need a password to unsubscribe, you can do it via
email confirmation. If you have trouble unsubscribing,
please send a message to the list detailing the problem. </div>
</blockquote>
</span>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
App_rpt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:App_rpt-users@ohnosec.org">App_rpt-users@ohnosec.org</a>
<a class="moz-txt-link-freetext" href="http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users">http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users</a>
To unsubscribe from this list please visit <a class="moz-txt-link-freetext" href="http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users">http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users</a> and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"
You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem. </pre>
</blockquote>
<br>
</body>
</html>