Changeset 2035
- Timestamp:
- 06/05/06 06:42:36 (7 years ago)
- Files:
-
- freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_extensions_from_mysql.pl (modified) (2 diffs)
- freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_iax_conf_from_mysql.pl (modified) (2 diffs)
- freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_meetme_conf_from_mysql.pl (modified) (2 diffs)
- freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_op_conf_from_mysql.pl (modified) (2 diffs)
- freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_queues_from_mysql.pl (modified) (2 diffs)
- freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_sip_conf_from_mysql.pl (modified) (2 diffs)
- freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_zap_conf_from_mysql.pl (modified) (2 diffs)
- freepbx/branches/1.0/apply_conf.sh (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_extensions_from_mysql.pl
r611 r2035 21 21 22 22 use DBI; 23 require "/var/www/html/admin/retrieve_parse_amportal_conf.pl"; 24 23 25 ################### BEGIN OF CONFIGURATION #################### 24 26 … … 30 32 # WARNING: this file will be substituted by the output of this program 31 33 $extensions_conf = "/etc/asterisk/extensions_additional.conf"; 32 # the name of the box the MySQL database is running on 33 $hostname = "localhost"; 34 34 35 # the name of the database our tables are kept 35 36 $database = "asterisk"; 37 38 # cool hack by Julien BLACHE <jblache@debian.org> 39 $ampconf = parse_amportal_conf( "/etc/amportal.conf" ); 36 40 # username to connect to the database 37 $username = "AMPDBUSER";41 $username = $ampconf->{"AMPDBUSER"}; 38 42 # password to connect to the database 39 $password = "AMPDBPASS"; 43 $password = $ampconf->{"AMPDBPASS"}; 44 # the name of the box the MySQL database is running on 45 $hostname = $ampconf->{"AMPDBHOST"}; 46 40 47 41 48 ################### END OF CONFIGURATION ####################### freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_iax_conf_from_mysql.pl
r337 r2035 8 8 9 9 use DBI; 10 require "/var/www/html/admin/retrieve_parse_amportal_conf.pl"; 11 10 12 ################### BEGIN OF CONFIGURATION #################### 11 13 … … 15 17 # WARNING: this file will be substituted by the output of this program 16 18 $iax_conf = "/etc/asterisk/iax_additional.conf"; 17 # the name of the box the MySQL database is running on18 $hostname = "localhost";19 19 # the name of the database our tables are kept 20 20 $database = "asterisk"; 21 22 # cool hack by Julien BLACHE <jblache@debian.org> 23 $ampconf = parse_amportal_conf( "/etc/amportal.conf" ); 21 24 # username to connect to the database 22 $username = "AMPDBUSER";25 $username = $ampconf->{"AMPDBUSER"}; 23 26 # password to connect to the database 24 $password = "AMPDBPASS"; 27 $password = $ampconf->{"AMPDBPASS"}; 28 # the name of the box the MySQL database is running on 29 $hostname = $ampconf->{"AMPDBHOST"}; 25 30 26 31 ################### END OF CONFIGURATION ####################### freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_meetme_conf_from_mysql.pl
r112 r2035 8 8 9 9 use DBI; 10 require "/var/www/html/admin/retrieve_parse_amportal_conf.pl"; 11 10 12 ################### BEGIN OF CONFIGURATION #################### 11 13 … … 15 17 # WARNING: this file will be substituted by the output of this program 16 18 $meetme_conf = "/etc/asterisk/meetme_additional.conf"; 17 # the name of the box the MySQL database is running on18 $hostname = "localhost";19 19 # the name of the database our tables are kept 20 20 $database = "asterisk"; 21 22 # cool hack by Julien BLACHE <jblache@debian.org> 23 $ampconf = parse_amportal_conf( "/etc/amportal.conf" ); 21 24 # username to connect to the database 22 $username = "AMPDBUSER";25 $username = $ampconf->{"AMPDBUSER"}; 23 26 # password to connect to the database 24 $password = "AMPDBPASS"; 27 $password = $ampconf->{"AMPDBPASS"}; 28 # the name of the box the MySQL database is running on 29 $hostname = $ampconf->{"AMPDBHOST"}; 30 25 31 26 32 ################### END OF CONFIGURATION ####################### freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_op_conf_from_mysql.pl
r751 r2035 8 8 9 9 use DBI; 10 require "/var/www/html/admin/retrieve_parse_amportal_conf.pl"; 11 10 12 ################### BEGIN OF CONFIGURATION #################### 11 13 … … 89 91 # WARNING: this file will be substituted by the output of this program 90 92 $op_conf = "AMPWEBROOT/panel/op_buttons_additional.cfg"; 91 # the name of the box the MySQL database is running on92 $hostname = "localhost";93 93 # the name of the database our tables are kept 94 94 $database = "asterisk"; 95 # username to connect to the database96 $username = "AMPDBUSER";97 # password to connect to the database98 $password = "AMPDBPASS";99 95 # sort option: extension or lastname 100 96 $sortoption = "extension"; 97 98 # cool hack by Julien BLACHE <jblache@debian.org> 99 $ampconf = parse_amportal_conf( "/etc/amportal.conf" ); 100 # username to connect to the database 101 $username = $ampconf->{"AMPDBUSER"}; 102 # password to connect to the database 103 $password = $ampconf->{"AMPDBPASS"}; 104 # the name of the box the MySQL database is running on 105 $hostname = $ampconf->{"AMPDBHOST"}; 106 101 107 102 108 ################### END OF CONFIGURATION ####################### freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_queues_from_mysql.pl
r138 r2035 4 4 5 5 use DBI; 6 require "/var/www/html/admin/retrieve_parse_amportal_conf.pl"; 7 6 8 ################### BEGIN OF CONFIGURATION #################### 7 9 … … 11 13 # WARNING: this file will be substituted by the output of this program 12 14 $queues_conf = "/etc/asterisk/queues_additional.conf"; 13 # the name of the box the MySQL database is running on14 $hostname = "localhost";15 15 # the name of the database our tables are kept 16 16 $database = "asterisk"; 17 18 # cool hack by Julien BLACHE <jblache@debian.org> 19 $ampconf = parse_amportal_conf( "/etc/amportal.conf" ); 17 20 # username to connect to the database 18 $username = "AMPDBUSER";21 $username = $ampconf->{"AMPDBUSER"}; 19 22 # password to connect to the database 20 $password = "AMPDBPASS"; 23 $password = $ampconf->{"AMPDBPASS"}; 24 # the name of the box the MySQL database is running on 25 $hostname = $ampconf->{"AMPDBHOST"}; 21 26 22 27 ################### END OF CONFIGURATION ####################### freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_sip_conf_from_mysql.pl
r337 r2035 8 8 9 9 use DBI; 10 require "/var/www/html/admin/retrieve_parse_amportal_conf.pl"; 11 10 12 ################### BEGIN OF CONFIGURATION #################### 11 13 … … 15 17 # WARNING: this file will be substituted by the output of this program 16 18 $sip_conf = "/etc/asterisk/sip_additional.conf"; 17 # the name of the box the MySQL database is running on18 $hostname = "localhost";19 19 # the name of the database our tables are kept 20 20 $database = "asterisk"; 21 22 # cool hack by Julien BLACHE <jblache@debian.org> 23 $ampconf = parse_amportal_conf( "/etc/amportal.conf" ); 21 24 # username to connect to the database 22 $username = "AMPDBUSER";25 $username = $ampconf->{"AMPDBUSER"}; 23 26 # password to connect to the database 24 $password = "AMPDBPASS"; 27 $password = $ampconf->{"AMPDBPASS"}; 28 # the name of the box the MySQL database is running on 29 $hostname = $ampconf->{"AMPDBHOST"}; 25 30 26 31 ################### END OF CONFIGURATION ####################### freepbx/branches/1.0/amp_conf/htdocs/admin/retrieve_zap_conf_from_mysql.pl
r91 r2035 8 8 9 9 use DBI; 10 require "/var/www/html/admin/retrieve_parse_amportal_conf.pl"; 11 10 12 ################### BEGIN OF CONFIGURATION #################### 11 13 … … 15 17 # WARNING: this file will be substituted by the output of this program 16 18 $zap_conf = "/etc/asterisk/zapata_additional.conf"; 17 # the name of the box the MySQL database is running on18 $hostname = "localhost";19 19 # the name of the database our tables are kept 20 20 $database = "asterisk"; 21 22 # cool hack by Julien BLACHE <jblache@debian.org> 23 $ampconf = parse_amportal_conf( "/etc/amportal.conf" ); 21 24 # username to connect to the database 22 $username = "AMPDBUSER";25 $username = $ampconf->{"AMPDBUSER"}; 23 26 # password to connect to the database 24 $password = "AMPDBPASS"; 27 $password = $ampconf->{"AMPDBPASS"}; 28 # the name of the box the MySQL database is running on 29 $hostname = $ampconf->{"AMPDBHOST"}; 25 30 26 31 ################### END OF CONFIGURATION ####################### freepbx/branches/1.0/apply_conf.sh
r735 r2035 1 #!/bin/ bash1 #!/bin/sh 2 2 3 3 if [ "$1" == "-h" ] … … 28 28 source $AMPCONFIG 29 29 30 31 30 echo "Updating configuration..." 32 31 … … 36 35 sed -r -i "s/hostname=[a-zA-Z0-9]*/hostname=$AMPDBHOST/" /etc/asterisk/cdr_mysql.conf 37 36 38 # do a bunch at once here39 find $AMPWEBROOT/admin/ -name retrieve\*.pl40 sed -r -i "s/username = \"[a-zA-Z0-9]*\";/username = \"$AMPDBUSER\";/" `find $AMPWEBROOT/admin/ -name retrieve\*.pl`41 sed -r -i "s/password = \"[a-zA-Z0-9]*\";/password = \"$AMPDBPASS\";/" `find $AMPWEBROOT/admin/ -name retrieve\*.pl`42 sed -r -i "s/hostname = \"[a-zA-Z0-9]*\";/hostname = \"$AMPDBHOST\";/" `find $AMPWEBROOT/admin/ -name retrieve\*.pl`43 44 37 # sort option for FOP 45 38 sed -r -i "s/sortoption = \"[a-zA-Z0-9]*\";/sortoption = \"$FOPSORT\";/" $AMPWEBROOT/admin/retrieve_op_conf_from_mysql.pl 46 47 39 sed -r -i "s!op_conf = \"[^\"]*\";!op_conf = \"$AMPWEBROOT\/panel\/op_buttons_additional.cfg\";!" $AMPWEBROOT/admin/retrieve_op_conf_from_mysql.pl 48 40 … … 64 56 sed -r -i "s!web_hostname=[a-zA-Z0-9\.]*!web_hostname=$AMPWEBADDRESS!" $FOPWEBROOT/op_server.cfg 65 57 66 67 68 69 58 echo "/etc/asterisk/vm_email.inc" 70 59 sed -r -i "s!http://.*/cgi-bin!http://$AMPWEBADDRESS/cgi-bin!" /etc/asterisk/vm_email.inc … … 75 64 $AMPSBIN/amportal chown 76 65 echo "Done" 77 exit78
