Changeset 11763

Show
Ignore:
Timestamp:
03/09/11 10:34:22 (2 years ago)
Author:
mbrevda
Message:

retore accedental erasure re r11762

Files:

Legend:

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

    r11762 r11763  
    1111ROOT_UID=0   # root uid is 0 
    1212E_NOTROOT=67 # Non-root exit error 
     13 
     14  # function to eventually get freepbx.conf to /etc  
     15move_freepbxconf() {  
     16  if [ -e /etc/asterisk/freepbx.conf -a ! -e /etc/freepbx.conf ]; then  
     17    echo moving /etc/asterisk/freepbx.conf to /etc/freepbx.conf  
     18    mv /etc/asterisk/freepbx.conf /etc/  
     19    if [ "$?" -ne "0" ]; then  
     20      echo "unable to move, FreePBX will function fine but you will"  
     21      echo "get this error until the file can be successfully moved"  
     22    else  
     23      FREEPBX_CONF="/etc/freepbx.conf"  
     24    fi  
     25  fi  
     26} 
     27 
    1328# define freepbx config file if not already set 
    1429if [ -z "$FREEPBX_CONF" ]; then 
     
    1732  elif [ -e "/etc/asterisk/freepbx.conf" ]; then 
    1833    FREEPBX_CONF="/etc/asterisk/freepbx.conf" 
     34     move_freepbxconf 
    1935  else 
    2036    FREEPBX_CONF="/etc/freepbx.conf"