Hi to all,
i’ve installed asterisk as a non-root user and all works well except after boot i’m not able to stop or restart asterisk with non-root user…
it says me “none killed”
if i “ps aux | grep asterisk” i can see the right user and i follow “The future of telephony guide” so:
1 - compiled with ==> “./configure --prefix=$HOME/asterisk-bin –sysconfdir=$HOME/asterisk-bin --localstatedir=$HOME/asterisk-bin”
ln -s /home/user/asterisk-bin/sbin/asterisk /usr/sbin/asterisk
PATH=$PATH:/usr/sbin
That should have take care of.
Alternative you could
PATH=$PATH:$HOME/asterisk-bin/bin/
or set an alias
[quote]i’m not able to stop or restart asterisk with non-root user…[/quote]Sorry I can’t understand you. ¿Are you stopping/restarting as root? ¿How?
No…when the server starts i can see the right non-root user as owner of process…but when i try to restart asterisk (with the same user) “/etc/init.d/asterisk restart” it says me “none killed”.
Scripts in /etc/init.d are meant to be run as root. When the system starts, it will start asterisk as root, then Asterisk changes to the non-root user. You will notice the the ‘safe-asterisk’ process is still running as root. It’s job is to monitor for abnormal shutdown of the Asterisk server itself and restart a new server in the event of an abnormal shutdown.
If you really want to simply restart asterisk, you can enter the remote console with asterisk -r and issue the command: core restart gracefully
Or you could setup and use sudo and do something like this: sudo /etc/init.d/asterisk restart