LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   arch linux: start asterisk as root at boot (https://www.linuxquestions.org/questions/linux-software-2/arch-linux-start-asterisk-as-root-at-boot-4175583645/)

aagaag 07-03-2016 01:47 AM

arch linux: start asterisk as root at boot
 
I have asterisk running on an arch linux virtual machine. Starting asterisk manually as root make it work fine:
Code:

$ ps aux | grep asterisk
avahi      297  0.0  0.0  41328  2996 ?        Ss  08:16  0:00 avahi-daemon: running [asterisk.local]
root      677 12.5  1.2 1349380 50152 ?      Ssl  08:40  0:02 asterisk
aag        757  0.0  0.0  10776  2144 pts/0    S+  08:40  0:00 grep asterisk

I then tried to start it automatically using:
Code:

sudo systemctl enable asterisk
The result is:
Code:

$ ps aux | grep asterisk
avahi      297  0.0  0.0  41328  2996 ?        Ss  08:16  0:00 avahi-daemon: running [asterisk.local]
asterisk  304  1.2  1.2 1352012 51260 ?      Ssl  08:16  0:14 /usr/bin/asterisk -f -C /etc/asterisk/asterisk.conf
aag        654  0.0  0.0  10776  2288 pts/0    S+  08:36  0:00 grep asterisk

In the second case, Asterisk seems to be denied access to its own SQlite database, implying that it runs as non-root. Is that correct? If so, which is the correct method to start asterisk as root automatically at boot? Many thanks and apologies for the na´vety of my question.

Emerson 07-04-2016 10:08 AM

I'd say you better give it proper access to the database instead of running as root.


All times are GMT -5. The time now is 09:43 AM.