Changeset 8170
- Timestamp:
- 08/25/09 19:03:54 (1 year ago)
- Files:
-
- freepbx/branches/2.6/amp_conf/bin/freepbx_engine (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.6/amp_conf/bin/freepbx_engine
r6816 r8170 30 30 AMPASTERISKWEBGROUP=$AMPASTERISKGROUP 31 31 AMPVMUMASK=077 32 ASTETCDIR=/etc/asterisk 32 33 33 34 . /etc/amportal.conf 35 36 if [ -z $PIDOF ]; then 37 PIDOF=pidof 38 fi 34 39 35 40 if [ $ASTRUNDIR = /var/run ] 36 41 then 37 42 echo "**** ERROR IN CONFIGURATION ****" 38 echo "astrundir in /etc/asterisk/asterisk.confis set to '/var/run' - THIS IS WRONG."43 echo "astrundir in '$ASTETCDIR' is set to '/var/run' - THIS IS WRONG." 39 44 echo "Please change it to something sensible (eg, '/var/run/asterisk') and re-run" 40 45 echo "install_amp" … … 45 50 then 46 51 echo "**** WARNING: ERROR IN CONFIGURATION ****" 47 echo "astrundir in /etc/asterisk/asterisk.confis set to $ASTRUNDIR but the directory"52 echo "astrundir in '$ASTETCDIR' is set to $ASTRUNDIR but the directory" 48 53 echo "does not exists. Attempting to create it with: 'mkdir -p $ASTRUNDIR'" 49 54 echo … … 63 68 64 69 chown -R $AMPASTERISKUSER:$AMPASTERISKGROUP $ASTRUNDIR 65 chown -R $AMPASTERISKUSER:$AMPASTERISKGROUP /etc/asterisk66 chmod -R g+w /etc/asterisk70 chown -R $AMPASTERISKUSER:$AMPASTERISKGROUP $ASTETCDIR 71 chmod -R g+w $ASTETCDIR 67 72 chown -R $AMPASTERISKUSER:$AMPASTERISKGROUP $ASTVARLIBDIR 68 73 chmod -R g+w $ASTVARLIBDIR … … 107 112 check_asterisk() { 108 113 # check to see if asterisk is running 109 # Note, this isn't fool-proof. If safe_asterisk is constantly restarting a dying asterisk, then there is a chance pidof will return non zero. We call this twice to reduce chances of this happening 110 pid_length=`pidof asterisk|awk '{print length($0)}'` 114 # Note, this isn't fool-proof. If safe_asterisk is constantly restarting a dying asterisk, 115 # then there is a chance pidof will return non zero. We call this twice to reduce chances of this happening 116 pid_length=`$PIDOF asterisk|awk '{print length($0)}'` 111 117 if [ "$pid_length" == "0" -a "$pid_length" != "" ] 112 118 then … … 126 132 echo 127 133 echo "STARTING ASTERISK" 128 pid_length=` pidofasterisk|awk '{print length($0)}'`134 pid_length=`$PIDOF asterisk|awk '{print length($0)}'` 129 135 if [ "$pid_length" != "0" -a "$pid_length" != "" ] 130 136 then … … 146 152 echo 147 153 echo "STOPPING ASTERISK" 148 pid_length=` pidofasterisk|awk '{print length($0)}'`154 pid_length=`$PIDOF asterisk|awk '{print length($0)}'` 149 155 if [ "$pid_length" != "0" -a "$pid_length" != "" ] 150 156 then … … 157 163 check_fop() { 158 164 #check to see if FOP is running 159 pid_length=` pidof-x op_server.pl|awk '{print length($0)}'`165 pid_length=`$PIDOF -x op_server.pl|awk '{print length($0)}'` 160 166 if [ "$pid_length" == "0" -a "$pid_length" != "" ] 161 167 then … … 174 180 echo 175 181 echo "STARTING FOP SERVER" 176 pid_length=` pidof-x op_server.pl|awk '{print length($0)}'`182 pid_length=`$PIDOF -x op_server.pl|awk '{print length($0)}'` 177 183 if [ "$pid_length" != "0" -a "$pid_length" != "" ] 178 184 then … … 191 197 echo 192 198 echo "STOPPING FOP SERVER" 193 pid_length=` pidof-x op_server.pl|awk '{print length($0)}'`199 pid_length=`$PIDOF -x op_server.pl|awk '{print length($0)}'` 194 200 if [ "$pid_length" != "0" -a "$pid_length" != "" ] 195 201 then
