[arm-allstar] Use allmon.ini to run a script
Darrell Black
gigahacker at gmail.com
Sun Jan 19 20:41:54 EST 2020
OK, after reading your comments I decided to go a different way. This is
what works and what does not work that I need some help with:
My really simple PHP test file (concept /srv/http/list.php):
===================================
<?php
$output = shell_exec('ls -lart');
echo "<pre>$output</pre>";
?>
===================================
If I browse http://192.168.1.248:5203/list.php
I get a file list <== it works as it should tells me I can run without
being logged in.
So I created the following:
My script dial_dmr.sh (works from BASH):
===================================
#!/bin/bash
asterisk -rx "rpt fun 50964 *350026"
===================================
My PHP (dial.php)
http://192.168.1.248:5203/dial.php
<http://192.168.1.248:5203/dial.php?run=true>
===================================
<?php
if ($_GET['run']) {
# This code will run if ?run=true is set.
shell_exec("/usr/local/sbin/dial_dmr.sh");
}
?>
<!-- This link will add ?run=true to your URL, dial.php?run=true -->
<a href="?run=true">Connect 146.680 to TG 310195</a>
===================================
All files set to 777 but it is not running my script
On Sat, Jan 18, 2020 at 11:20 PM "Doug Crompton via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:
> Darrell,
>
> "To key up, say their call, press buttons is
> embarrassing for most younger hams."
>
> I think you need to do some training there! This is amateur radio. They are
> suppose to use and talk on the radio!
>
> That being said unfortunately there is not an easy to do that. One of the
> things we have on the future list for Supermon is levels of security but
> right now there is only two - allowing full access and restricting access
> to editing and simpleusb commands. It still allows most operations. You can
> try it and see if it suits your needs. To do so you add a user/pass to the
> edit directory of Supermon. Do the same thing you would in adding the
> htpasswd only do it in the /srv/http/supermon/edit directory. Then users
> would login to Supermon but would again need to login with a different
> user/pass to edit or control simpleusb. Only "super" admins would have
> access there.
>
>
> *73 Doug*
>
> *WA3DSP*
>
> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
>
>
> On Sat, Jan 18, 2020 at 6:55 PM "Darrell Black via ARM-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
> > I want to allow my club to dial a preset node by pressing a button on the
> > supermon page but without allowing them to log in. I think the easiest
> way
> > to do this is to add it into allmon.ini as a link but its really calling
> a
> > script. Or I would like to call the script from our clubs web
> site...either
> > way, is this possible. Can someone give me a example?
> >
> > Yes, we could use touch tones on the repeater but most younger people
> want
> > web-based solutions. To key up, say their call, press buttons is
> > embarrassing for most younger hams.
> >
> > --
> >
> > 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