<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><p style="margin: 0px;" data-mce-style="margin: 0px;">Issuses with running bash scripts from within allstar by DTMF. Host is X86 type, I'm logged in as root, file permissions set to 777 for both ab.sh and asd.dat. it works from linux cli, partially works from asterisk cli, !/path/script, and does not work from within rpt.conf. 713=cmd,/path/script. Running asterisk version 0.327 installed about a month ago from iso file. So story begins...</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">This simple script prints 1234, prints the time/date and appends the time and date onto file asd.dat. </p><p style="margin: 0px;" data-mce-style="margin: 0px;">/etc/asterisk$ cat script: ab.sh</p><p style="margin: 0px;" data-mce-style="margin: 0px;">#!/bin/bash<br>echo 1234<br>date<br>date >> asd.dat</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Script runs as it should from the command line of a linux console window<br>/etc/asterisk$ ./ab.sh<br>1234<br>Mon Oct 22 22:05:22 EDT 2018<br>* Note the time ^^^</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Now to check the file and find 05:22: cat asd.dat</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Mon Oct 22 22:05:05 EDT 2018<br>Mon Oct 22 22:05:22 EDT 2018 <yay it worked</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">But from within Asterisk CLI it only works 1/2 way:<br>*CLI> !/etc/asterisk/ab.sh<br>1234<br>Mon Oct 22 22:11:44 EDT 2018<br>* Note the time ^^^ 6 minutes later, It printed within the asterisk CLI, but did not append to the file.</p><p style="margin: 0px;" data-mce-style="margin: 0px;">cat asd.dat<br>Mon Oct 22 22:05:05 EDT 2018<br>Mon Oct 22 22:05:22 EDT 2018 < still the old time in the file. not 11:44, so run from asterisk CLI does not let script update the file??</p><p style="margin: 0px;" data-mce-style="margin: 0px;">And even worse when I try to do this via the rpt.conf file:<br></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><snip> of rpt.conf<br>713 = !/etc/asterisk/ab.sh<br>714 = cmd,/etc/asterisk/ab.sh<br>715 = cmd,/etc/asterisk/nothere.sh</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">command 713 does nothing, wrong syntax for rpt.conf but tried as a test anyway., 714 tries to do something, but does not work., 715 should fail or report error as there is no file by that name but behaves same as 714.<br>n3sdorpt2*CLI> rpt fun 29019 *713<br>n3sdorpt2*CLI> rpt fun 29019 *714<br>[Oct 22 23:32:28] NOTICE[20572]: app_rpt.c:4084 function_cmd: cmd param = /etc/asterisk/ab.sh, digitbuf = <br>n3sdorpt2*CLI> rpt fun 29019 *715<br>[Oct 22 23:33:55] NOTICE[20572]: app_rpt.c:4084 function_cmd: cmd param = /etc/asterisk/nothere.sh, digitbuf =</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">I am doing something wrong or have things set wrong in the OS, or is this function been disabled?</p><p style="margin: 0px;" data-mce-style="margin: 0px;">Please advise. N3SDO</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p></div></body></html>