asterisk addon: Do not run asterisk as root.
authorDirk Wagner <dirk.wagner@ipfire.org>
Wed, 7 May 2014 19:35:12 +0000 (21:35 +0200)
committerDirk Wagner <dirk.wagner@ipfire.org>
Wed, 7 May 2014 19:35:12 +0000 (21:35 +0200)
lfs/asterisk
src/initscripts/init.d/asterisk

index a87cad9..54c3d5d 100755 (executable)
@@ -144,6 +144,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cp -vrf $(DIR_SRC)/config/asterisk/* /var/ipfire/asterisk/
        chmod o+w /var/ipfire/asterisk
        chown nobody:nobody -R /var/ipfire/asterisk
+       chown nobody:nobody -R /var/lib/asterisk
        ln -f -s /var/ipfire/asterisk/wakeup/wakeup.sh /etc/fcron.minutely/wakeup.sh
 
        # be sure all source is removed
index aac9a63..db80eb3 100644 (file)
@@ -18,7 +18,7 @@
 case "${1}" in
        start)
                boot_mesg "Starting Asterisk PBX..."
-               loadproc /usr/sbin/asterisk -p
+               loadproc /usr/sbin/asterisk -p -U nobody -G nobody
                ;;
 
        stop)