mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 18:46:24 +05:00
Small modifications asterisk tutorial
This commit is contained in:
@@ -3,6 +3,7 @@ astetcdir => /usr/share/cgrates/tutorials/asterisk_ari/asterisk/etc/asterisk
|
||||
astspooldir => /tmp/cgr_asterisk_ari/asterisk/spool
|
||||
astlogdir => /tmp/cgr_asterisk_ari/asterisk/log
|
||||
astrundir => /tmp/cgr_asterisk_ari/asterisk/run
|
||||
astdbdir => /tmp/cgr_asterisk_ari/asterisk/lib
|
||||
|
||||
[options]
|
||||
runuser = asterisk ; The user to run as. The default is root.
|
||||
|
||||
@@ -26,6 +26,7 @@ TMP_DIR=/tmp/cgr_asterisk_ari/asterisk
|
||||
DAEMON=/usr/sbin/asterisk
|
||||
ASTVARRUNDIR=$TMP_DIR/run
|
||||
LOGDIR=$TMP_DIR/log
|
||||
DBDIR=$TMP_DIR/lib
|
||||
CDRDIR=$LOGDIR/cdr-custom
|
||||
SPOOLDIR=$TMP_DIR/spool
|
||||
ALTCONF=$TUTDIR/etc/asterisk/asterisk.conf
|
||||
@@ -75,6 +76,11 @@ if [ ! -d $SPOOLDIR ]; then
|
||||
chown -R $AST_USER:$AST_GROUP $SPOOLDIR
|
||||
fi
|
||||
|
||||
if [ ! -d $DBDIR ]; then
|
||||
mkdir -p $DBDIR
|
||||
chown -R $AST_USER:$AST_GROUP $DBDIR
|
||||
fi
|
||||
|
||||
# Use the LSB standard functions for services management
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
@@ -138,6 +144,7 @@ case "$1" in
|
||||
ASTARGS="$ASTARGS -n"
|
||||
fi
|
||||
# "start-stop-daemon --oknodo" returns 0 even if Asterisk was already running (as LSB expects):
|
||||
echo "$DAEMON -- $ASTARGS"
|
||||
start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS
|
||||
log_end_msg $?
|
||||
;;
|
||||
|
||||
@@ -17,6 +17,7 @@ We got Asterisk14_ installed via following commands:
|
||||
./configure --with-pjproject-bundled
|
||||
make
|
||||
make install
|
||||
adduser --quiet --system --group --disabled-password --shell /bin/false --gecos "Asterisk" asterisk || true
|
||||
|
||||
Once installed we proceed with loading the configuration out of specific tutorial cases bellow.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user