diff options
Diffstat (limited to 'contrib/scripts/safe_asterisk')
-rw-r--r-- | contrib/scripts/safe_asterisk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk index 6f3b5ebef..367f6a6a9 100644 --- a/contrib/scripts/safe_asterisk +++ b/contrib/scripts/safe_asterisk @@ -12,7 +12,8 @@ MACHINE=`hostname` # To specify which machine has crashed when getting the mai DUMPDROP=/tmp SLEEPSECS=4 ASTSBINDIR=__ASTERISK_SBIN_DIR__ -ASTPIDFILE=__ASTERISK_VARRUN_DIR__/asterisk.pid +ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__ +ASTPIDFILE=${ASTVARRUNDIR}/asterisk.pid # comment this line out to have this script _not_ kill all mpg123 processes when # asterisk exits @@ -91,6 +92,11 @@ else # set the process's filemax to whatever set above ulimit -n $MAXFILES + if [ ! -d ${ASTVARRUNDIR} ]; then + mkdir -p ${ASTVARRUNDIR} + chmod 770 ${ASTVARRUNDIR} + fi + fi if test "x$UMASK" != "x"; then |