[Asterisk-Users] Resetting Asterisk

Tony Kava asterisk at pottcounty.com
Mon Apr 26 12:44:26 MST 2004


Hello.

Kyle Hagan wrote:
> '/bin/sh: line 1: /usr/sbin/asterisk -rx reload: No such file 
> or directory'.

It looks like /bin/sh is being given your entire command line as a single
argument.  If /bin/sh were unable to find /usr/sbin/asterisk its error
should look like:

'/bin/sh: line 1: /usr/sbin/asterisk: No such file or directory'

Instead it is looking for /usr/sbin/asterisk\ -rx\ reload (as if it were the
complete filename)

You may need to either modify your exten entry to something like: (I'm not
sure if this syntax works in Asterisk)

exten => *99,1,System("/usr/sbin/asterisk","-rx","reload")

Or just create a shell script (i.e. /usr/local/sbin/reload-asterisk.sh) that
you can call using:

exten => *99,1,System("/usr/local/sbin/reload-asterisk.sh")

The script could be as simple as:

#!/bin/sh
/usr/sbin/asterisk -rx reload

...

Just an idea.

--
Tony Kava
Senior Network Administrator
Pottawattamie County, Iowa





More information about the asterisk-users mailing list