[Asterisk-Users] Can asterisk be run as non root anymore?

Matt Gibson gibson at experthost.com
Tue Dec 21 10:49:39 MST 2004


Andrew McRory wrote:

> 
> 
> Kiristan, thanks for the reply. Are you running the v1.0.3? I had 
> alread tried setting the perms according to the wiki but it did not help. 
> This problem started for me after the 1.0 release. I've searched for the 
> answer to no avail.
> 
> Regards,
> 

Try running asterisk from within screen instead - that's what I did and 
it seems to work nicer than safe_asterisk, and you get the added benefit 
of a seperate screenlog for all your commends when typing on the CLI.

/etc/rc.d/rc.local:

# this is to run asterisk as user 'asterisk'
#/usr/sbin/run_ast.sh
su asterisk -c /usr/sbin/run_ast.sh


/usr/sbin/run_ast.sh:

#!/bin/bash

logdir="/var/log/asterisk"
screen='/usr/local/bin/screen'
screenopts='-L -d -m'
asterisk='/usr/sbin/asterisk'
asteriskopts='-vvvvvvvvvvvvvvvvvvvvvvvvvvgc'

# this is here so the log ends up in that dir not /usr/sbin
cd $logdir
$screen $screenopts $asterisk $asteriskopts

Matt


-- 
Matt Gibson
VOIP Administrator
NJ Tech Solutions
1.314.480.4550 ex. 6400
1.877.999.4678 ex. 6400





More information about the asterisk-users mailing list