Changeset 6601
- Timestamp:
- 09/07/08 15:39:51 (3 months ago)
- Files:
-
- freepbx/branches/2.5/amp_conf/bin/freepbx_engine (modified) (3 diffs)
- freepbx/branches/2.5/amp_conf/bin/retrieve_conf (modified) (1 diff)
- freepbx/branches/2.5/amp_conf/htdocs/admin/functions.inc.php (modified) (2 diffs)
- freepbx/branches/2.5/amp_conf/htdocs/admin/views/freepbx.php (modified) (1 diff)
- freepbx/branches/2.5/amportal.conf (modified) (1 diff)
- freepbx/branches/2.5/install_amp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.5/amp_conf/bin/freepbx_engine
r6595 r6601 216 216 if [ -z "$FOPRUN" -o "$FOPRUN" == "true" -o "$FOPRUN" == "TRUE" -o "$FOPRUN" == "True" -o "$FOPRUN" == "yes" -o "$FOPRUN" == "YES" -o "$FOPRUN" == "Yes" ] 217 217 then 218 run_fop 218 if [ -z "$FOPDISABLE" -o "$FOPDISABLE" == "false" -o "$FOPDISABLE" == "FALSE" -o "$FOPDISABLE" == "False" -o "$FOPDISABLE" == "no" -o "$FOPDISABLE" == "NO" -o "$FOPDISABLE" == "No" ] 219 then 220 run_fop 221 fi 219 222 fi 220 223 ;; … … 231 234 if [ -z "$FOPRUN" -o "$FOPRUN" == "true" -o "$FOPRUN" == "TRUE" -o "$FOPRUN" == "True" -o "$FOPRUN" == "yes" -o "$FOPRUN" == "YES" -o "$FOPRUN" == "Yes" ] 232 235 then 233 run_fop 236 if [ -z "$FOPDISABLE" -o "$FOPDISABLE" == "false" -o "$FOPDISABLE" == "FALSE" -o "$FOPDISABLE" == "False" -o "$FOPDISABLE" == "no" -o "$FOPDISABLE" == "NO" -o "$FOPDISABLE" == "No" ] 237 then 238 run_fop 239 fi 234 240 fi 235 241 ;; … … 253 259 ;; 254 260 *) 261 if [ -z "$FOPRUN" -o "$FOPRUN" == "true" -o "$FOPRUN" == "TRUE" -o "$FOPRUN" == "True" -o "$FOPRUN" == "yes" -o "$FOPRUN" == "YES" -o "$FOPRUN" == "Yes" ] 262 then 263 if [ -z "$FOPDISABLE" -o "$FOPDISABLE" == "false" -o "$FOPDISABLE" == "FALSE" -o "$FOPDISABLE" == "False" -o "$FOPDISABLE" == "no" -o "$FOPDISABLE" == "NO" -o "$FOPDISABLE" == "No" ] 264 then 265 FOPUSAGE="start_fop|stop_fop|restart_fop|" 266 fi 267 fi 268 255 269 echo "-------------FreePBX Control Script-----------------------------------------------" 256 270 echo 257 echo "Usage: amportal start|stop|restart| start_fop|stop_fop|restart_fop|kill|chown"271 echo "Usage: amportal start|stop|restart|${FOPUSAGE}kill|chown" 258 272 echo 259 273 echo "start: Starts Asterisk and Flash Operator Panel server if enabled" 260 274 echo "stop: Gracefully stops Asterisk and the FOP server" 261 275 echo "restart: Stop and Starts" 262 echo "start_fop: Starts FOP server and Asterisk if not running" 263 echo "stop_fop: Stops FOP serverg" 264 echo "restart_fop: Stops FOP server and Starts it and Asterisk if not running" 276 if [ -z "$FOPRUN" -o "$FOPRUN" == "true" -o "$FOPRUN" == "TRUE" -o "$FOPRUN" == "True" -o "$FOPRUN" == "yes" -o "$FOPRUN" == "YES" -o "$FOPRUN" == "Yes" ] 277 then 278 if [ -z "$FOPDISABLE" -o "$FOPDISABLE" == "false" -o "$FOPDISABLE" == "FALSE" -o "$FOPDISABLE" == "False" -o "$FOPDISABLE" == "no" -o "$FOPDISABLE" == "NO" -o "$FOPDISABLE" == "No" ] 279 then 280 281 echo "start_fop: Starts FOP server and Asterisk if not running" 282 echo "stop_fop: Stops FOP serverg" 283 echo "restart_fop: Stops FOP server and Starts it and Asterisk if not running" 284 fi 285 fi 265 286 echo "kill: Kills Asterisk and the FOP server" 266 287 echo "chown: Sets appropriate permissions on files" freepbx/branches/2.5/amp_conf/bin/retrieve_conf
r6595 r6601 717 717 // script to write op_server.cfg file from mysql 718 718 // 719 $script = $amp_conf['AMPBIN'].'/retrieve_op_conf_from_mysql.pl '.$amportalconf.' '.rtrim($asterisk_conf['astetcdir'],DIRECTORY_SEPARATOR); 720 exec($script, $output, $ret); 721 if ($ret) { 722 fatal(sprintf(_("retrieve_op_conf_from_mysql.pl returned with an error code %s"),$ret)); 723 } 724 719 if(!$amp_conf['FOPDISABLE']) { 720 $script = $amp_conf['AMPBIN'].'/retrieve_op_conf_from_mysql.pl '.$amportalconf.' '.rtrim($asterisk_conf['astetcdir'],DIRECTORY_SEPARATOR); 721 exec($script, $output, $ret); 722 if ($ret) { 723 fatal(sprintf(_("retrieve_op_conf_from_mysql.pl returned with an error code %s"),$ret)); 724 } 725 } 725 726 // generate configuration files 726 727 // freepbx/branches/2.5/amp_conf/htdocs/admin/functions.inc.php
r6595 r6601 729 729 'AMPENABLEDEVELDEBUG'=> array('bool' , false), 730 730 'AMPMPG123' => array('bool' , true), 731 'FOPDISABLE' => array('bool' , false), 731 732 'ZAP2DAHDICOMPAT' => array('bool' , false), 732 733 ); … … 1494 1495 1495 1496 1496 if ($amp_conf['FOPRUN'] ) {1497 if ($amp_conf['FOPRUN'] && !$amp_conf['FOPDISABLE']) { 1497 1498 //bounce op_server.pl 1498 1499 $wOpBounce = $amp_conf['AMPBIN'].'/bounce_op.sh'; freepbx/branches/2.5/amp_conf/htdocs/admin/views/freepbx.php
r6477 r6601 165 165 print_sub_tool( _("Admin") , "config.php", $currentFile=='config.php' ); 166 166 print_sub_tool( _("Reports") , "reports.php", $currentFile=='reports.php' ); 167 print_sub_tool( _("Panel") , "panel.php" , $currentFile=='panel.php' ); 167 if(!$amp_conf["FOPDISABLE"]) { 168 print_sub_tool( _("Panel") , "panel.php" , $currentFile=='panel.php' ); 169 } 168 170 print_sub_tool( _("Recordings"), "../recordings/index.php" ,0, NULL, "ari" ); 169 171 print_sub_tool( _("Help"), "http://www.freepbx.org/freepbx-help-system$help_args" ,0, NULL, "help" ); freepbx/branches/2.5/amportal.conf
r6597 r6601 200 200 # less frequently (such as Astersisk Uptime) based on the INFO value 201 201 202 # FOPDISABLE=true|false # DEFAULT VALUE false 203 # Disables FOP in interface and retrieve_conf. Usefull for sqlite3 or if you don't want FOP. 204 202 205 # ZAP2DAHDICOMPAT=true|false 203 206 # DEFAULT VALUE: false freepbx/branches/2.5/install_amp
r6231 r6601 125 125 out(" --install-moh Install default music-on-hold files (normally doesn't, unless "); 126 126 out(" it's a new installation)"); 127 out(" --install-fop=false Don't install FOP and don't display it anywhere on the interface"); 127 128 //out(" --make-links-devel Make links to files in the source directory instead of copying"); 128 129 //out(" (intended for developers only)"); … … 569 570 // **** Parse out command-line options 570 571 $shortopts = "h?u:p:"; 571 $longopts = array("help","debug","dry-run","username=","password=","force-version=","dbhost=","no-files","dbname=","my-svn-is-correct","engine=","webroot=","install-moh"," make-links-devel","skip-module-install");572 $longopts = array("help","debug","dry-run","username=","password=","force-version=","dbhost=","no-files","dbname=","my-svn-is-correct","engine=","webroot=","install-moh","install-fop","make-links-devel","skip-module-install"); 572 573 573 574 $args = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), $shortopts, $longopts); … … 584 585 585 586 $install_moh = false; 587 $install_fop = true; 586 588 $make_links = false; 587 589 $module_install = true; … … 642 644 case "--install-moh": 643 645 $install_moh = true; 646 break; 647 case "--install-fop": 648 if($arg[1] != "false") { 649 $install_fop = true; 650 out("FOP will be installed and activated."); 651 } 652 else { 653 out("FOP will be deactivated in the interface. Set FOPDISABLE=false in amportal.conf to change later."); 654 655 } 656 644 657 break; 645 658 case "--make-links-devel": … … 785 798 $amp_conf["AMPDBNAME"] = $dbname; 786 799 } 787 800 if(!$install_fop) { // Set from --install-fop parameter; Add it to amportal.conf 801 out("Adding FOPDISABLE option to amportal.conf"); 802 $amp_conf["FOPDISABLE"] = "true"; 803 } 804 // If they pre-set this in their amportal.conf or this is an upgrade, we should honor it as well 805 if($amp_conf["FOPDISABLE"] == "true" || $amp_conf["FOPDISABLE"] == "YES" || $amp_conf["FOPDISABLE"] == "yes" || $amp_conf["FOPDISABLE"] == "Yes" || $amp_conf["FOPDISABLE"] == "y" ) { 806 $install_fop = false; 807 } 788 808 // write amportal.conf 789 809 write_amportal_conf(AMP_CONF, $amp_conf); … … 1094 1114 $version = install_getversion(); 1095 1115 1096 // **** Bounce FOP 1097 outn("Restarting Flash Operator Panel.."); 1098 exec('su - asterisk -c "'.$amp_conf["AMPBIN"].'/bounce_op.sh"'); 1099 out("OK"); 1100 1116 if($install_fop && $amp_conf["FOPRUN"]) { 1117 // **** Bounce FOP 1118 outn("Restarting Flash Operator Panel.."); 1119 exec('su - asterisk -c "'.$amp_conf["AMPBIN"].'/bounce_op.sh"'); 1120 out("OK"); 1121 } 1101 1122 1102 1123 // Now force an install for all modules that are packaged with the tarball
