Changeset 2092
- Timestamp:
- 06/25/06 21:08:53 (7 years ago)
- Files:
-
- freepbx/trunk/install_amp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/install_amp
r2090 r2092 68 68 out("Optional parameters:"); 69 69 out(" --help, -h, -? Show this help"); 70 out(" --dbhost <ip address> Use a remote database server"); 71 out(" --dbname databasename Use database name specified, instead of 'asterisk'"); 70 72 out(" --username <user> Use <user> to connect to db and write config"); 71 73 out(" --password <pass> Use <pass> to connect to db and write config"); 74 /* out(" --fopwebroot <path> Web path where fop will be installed"); 75 out(" --webroot <path> Web root where freepbx will be installed"); 76 out(" --cgibin <path> Path where cgi-bin's lives"); 77 out(" --bin <path> Path of asterisk binaries"); 78 out(" --sbin <path> Path of system admin binaries"); 79 out(" --asteriskuser <user> Asterisk Manager username"); 80 out(" --asteriskpass <pass> Asterisk Manager password"); 81 out(" --systemconfig <path> System config files"); */ 72 82 out(" --debug Enable debug output"); 73 83 out(" --dry-run Don't actually do anything"); 74 84 out(" --force-version <ver> Force upgrade from version <ver>"); 75 out(" --dbhost <ip address> Use a remote database server");76 out(" --dbname databasename Use database name specified, instead of 'asterisk'");77 85 out(" --no-files Just run updates without installing files"); 78 86 } … … 420 428 */ 421 429 function collect_settings($filename, $dbhost = '', $dbuser = '', $dbpass = '', $dbname = 'asterisk') { 422 out("Creating new /etc/amportal.conf");430 out("Creating new $filename"); 423 431 424 432 outn("Enter your USERNAME to connect to the '$dbname' database:\n [".($dbuser ? $dbuser : "asteriskuser")."] "); … … 533 541 // write amportal.conf 534 542 write_amportal_conf($filename, $amp_conf); 535 outn( "/etc/amportal.confwritten");543 outn(AMP_CONF." written"); 536 544 } 537 545 … … 625 633 out("Running upgrade only, without installing files."); 626 634 break; 635 /* case "--fopwebroot": 636 $fopwebroot = $arg[1]; 637 out("Using fop at ".$fopwebroot); 638 break; 639 case "--webroot": 640 $webroot = $arg[1]; 641 out("Using Webroot at ".$webroot); 642 break; 643 case "--cgibin": 644 $cgibin = $arg[1]; 645 out("Using CGI-BIN at ".$cgibin); 646 break; 647 case "--bin": 648 $bin = $arg[1]; 649 out("Using bin at ".$bin); 650 break; 651 case "--sbin": 652 $sbin = $arg[1]; 653 out("Using sbin ar ".$sbin); 654 break; 655 case "--asteriskuser": 656 $asteriskuser = $arg[1]; 657 out("Using Asterisk user ".$asteriskuser); 658 break; 659 case "--asteriskpass": 660 $asteriskpass = $arg[1]; 661 out("Using asteriskpass ".str_repeat("*",strlen($arg[1]))); 662 break; 663 case "--systemconfig": 664 $systemconfig = $arg[1]; 665 out("Using system config at ". $systemconfig); 666 break; */ 667 627 668 } 628 669 } … … 647 688 if (!file_exists(AMP_CONF)) { 648 689 out(AMP_CONF." does not exist, copying default"); 649 copy("amportal.conf", "/etc/amportal.conf");690 copy("amportal.conf", AMP_CONF); 650 691 collect_settings(AMP_CONF, $dbhost, $new_username, $new_password, $dbname); 651 692 } … … 716 757 if (!file_exists(ASTERISK_CONF)) { 717 758 out(ASTERISK_CONF." does not exist, copying default"); 718 copy("asterisk.conf", "/etc/asterisk/asterisk.conf");759 copy("asterisk.conf", AMP_CONF); 719 760 } 720 761 out("OK"); … … 795 836 796 837 if (!isset($amp_conf["AMPDBFILE"])) 797 die("You must setup properly AMPDBFILE in /etc/amportal.conf");838 die("You must setup properly AMPDBFILE in ".AMP_CONF); 798 839 799 840 if (isset($amp_conf["AMPDBFILE"]) == "") 800 die("AMPDBFILE in /etc/amportal.confcannot be blank");841 die("AMPDBFILE in ".AMP_CONF." cannot be blank"); 801 842 802 843 $DSN = array (
