Changeset 4879

Show
Ignore:
Timestamp:
08/13/07 20:39:39 (6 years ago)
Author:
p_lindheimer
Message:

fix typo and change so if ASTRUNDIR does not exist, it will write out a warning and then attempt a mkdir -p and fail if that does not work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.3/amp_conf/bin/freepbx_engine

    r4705 r4879  
    3535if [ ! -d "$ASTRUNDIR" ] 
    3636  then 
    37     echo "**** ERROR IN CONFIGURATION ****" 
     37    echo "**** WARNING: ERROR IN CONFIGURATION ****" 
    3838    echo "astrundir in /etc/asterisk/asterisk.conf is set to $ASTRUNDIR but the directory" 
    39     echo "does not exists. Please rectify this situation. (You could try 'mkdri -p $ASTRUNDIR'" 
    40     echo "and then re-run install_amp" 
    41     exit; 
     39    echo "does not exists. Attempting to create it with: 'mkdir -p $ASTRUNDIR'" 
     40    echo 
     41    mkdir -p $ASTRUNDIR 
     42    RET=$? 
     43    if [ $RET != 0 ] 
     44    then 
     45      echo "**** ERROR: COULD NOT CREATE $ASTRUNDIR ****" 
     46      echo "Attempt to execute 'mkdir -p $ASTRUNDIR' failed with an exit code of $RET" 
     47      echo "You must create this directory and the try again." 
     48      exit 
     49    fi 
    4250fi 
    4351