Commit 23216f74 authored by Michael Fürmann's avatar Michael Fürmann

Setup routine for prosody

parent 7a2f3234
...@@ -227,8 +227,17 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d'; ...@@ -227,8 +227,17 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget'; $conf['cron']['wget'] = '/usr/bin/wget';
//* Metronome XMPP //* Metronome XMPP
$conf['xmpp']['installed'] = false; $conf['metronome']['installed'] = false;
$conf['xmpp']['init_script'] = 'metronome'; $conf['metronome']['init_script'] = 'metronome';
$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons';
//* Prosody XMPP
$conf['prosody']['installed'] = false;
$conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence';
?> ?>
...@@ -227,7 +227,16 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d'; ...@@ -227,7 +227,16 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget'; $conf['cron']['wget'] = '/usr/bin/wget';
//* Metronome XMPP //* Metronome XMPP
$conf['xmpp']['installed'] = false; $conf['metronome']['installed'] = false;
$conf['xmpp']['init_script'] = 'metronome'; $conf['metronome']['init_script'] = 'metronome';
$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons';
//* Prosody XMPP
$conf['prosody']['installed'] = false;
$conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence';
?> ?>
...@@ -227,8 +227,17 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d'; ...@@ -227,8 +227,17 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget'; $conf['cron']['wget'] = '/usr/bin/wget';
//* Metronome XMPP //* Metronome XMPP
$conf['xmpp']['installed'] = false; $conf['metronome']['installed'] = false;
$conf['xmpp']['init_script'] = 'metronome'; $conf['metronome']['init_script'] = 'metronome';
$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons';
//* Prosody XMPP
$conf['prosody']['installed'] = false;
$conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence';
?> ?>
...@@ -227,8 +227,17 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d'; ...@@ -227,8 +227,17 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget'; $conf['cron']['wget'] = '/usr/bin/wget';
//* Metronome XMPP //* Metronome XMPP
$conf['xmpp']['installed'] = false; $conf['metronome']['installed'] = false;
$conf['xmpp']['init_script'] = 'metronome'; $conf['metronome']['init_script'] = 'metronome';
$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons';
//* Prosody XMPP
$conf['prosody']['installed'] = false;
$conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence';
?> ?>
...@@ -223,8 +223,17 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d'; ...@@ -223,8 +223,17 @@ $conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget'; $conf['cron']['wget'] = '/usr/bin/wget';
//* Metronome XMPP //* Metronome XMPP
$conf['xmpp']['installed'] = false; $conf['metronome']['installed'] = false;
$conf['xmpp']['init_script'] = 'metronome'; $conf['metronome']['init_script'] = 'metronome';
$conf['metronome']['initial_modules'] = 'saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons';
//* Prosody XMPP
$conf['prosody']['installed'] = false;
$conf['prosody']['init_script'] = 'prosody';
$conf['prosody']['storage_database'] = 'prosody';
$conf['prosody']['storage_user'] = 'prosody';
$conf['prosody']['storage_password'] = md5(uniqid(rand()));
$conf['prosody']['initial_modules'] = 'roster, saslauth, tls, dialback, disco, carbons, pep, private, blocklist, vcard, version, uptime, time, ping, admin_adhoc, mam, bosh, websocket, http_files, announce, proxy65, offline, posix, webpresence';
?> ?>
...@@ -517,12 +517,20 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Fire ...@@ -517,12 +517,20 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Fire
} }
} }
//* Configure XMPP if($install_mode == 'standard' || strtolower($inst->simple_query('Configure XMPP Server', array('y', 'n') , 'y','configure_xmpp') ) == 'y') {
$force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server', ($install_mode == 'expert')); //* Configure XMPP Metronome
if($force) { if ($conf['metronome']['installed']) {
swriteln('Configuring Metronome XMPP Server'); swriteln('Configuring Metronome XMPP Server');
$inst->configure_xmpp(); $inst->configure_metronome();
$conf['services']['xmpp'] = true; $conf['services']['xmpp'] = true;
}
//* Configure XMPP Prosody
if ($conf['prosody']['installed']) {
swriteln('Configuring Prosody XMPP Server');
$inst->configure_prosody();
$conf['services']['xmpp'] = true;
}
} }
//* Configure Fail2ban //* Configure Fail2ban
...@@ -630,7 +638,7 @@ if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '') sys ...@@ -630,7 +638,7 @@ if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '') sys
//if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); //if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null');
if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'restart').' &> /dev/null'); if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'restart').' &> /dev/null');
if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '') system($inst->getinitcommand($conf['ufw']['init_script'], 'restart').' &> /dev/null'); if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '') system($inst->getinitcommand($conf['ufw']['init_script'], 'restart').' &> /dev/null');
if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); if($conf['metronome']['installed'] == true && $conf['metronome']['init_script'] != '') system($inst->getinitcommand($conf['metronome']['init_script'], 'restart').' &> /dev/null');
//* test tRNG //* test tRNG
if($conf['tRNG']) tRNG(); if($conf['tRNG']) tRNG();
......
This diff is collapsed.
...@@ -345,6 +345,8 @@ function updateDbAndIni() { ...@@ -345,6 +345,8 @@ function updateDbAndIni() {
$tpl_ini_array['web']['php_fpm_start_port'] = $conf['nginx']['php_fpm_start_port']; $tpl_ini_array['web']['php_fpm_start_port'] = $conf['nginx']['php_fpm_start_port'];
$tpl_ini_array['web']['php_fpm_socket_dir'] = $conf['nginx']['php_fpm_socket_dir']; $tpl_ini_array['web']['php_fpm_socket_dir'] = $conf['nginx']['php_fpm_socket_dir'];
$tpl_ini_array['xmpp']['xmpp_daemon'] = ($conf['metronome']['installed'] == true)?'metronome':'prosody';
if ($conf['nginx']['installed'] == true) { if ($conf['nginx']['installed'] == true) {
$tpl_ini_array['web']['server_type'] = 'nginx'; $tpl_ini_array['web']['server_type'] = 'nginx';
$tpl_ini_array['global']['webserver'] = 'nginx'; $tpl_ini_array['global']['webserver'] = 'nginx';
......
...@@ -154,9 +154,10 @@ do_not_try_rescue_mysql=n ...@@ -154,9 +154,10 @@ do_not_try_rescue_mysql=n
do_not_try_rescue_mail=n do_not_try_rescue_mail=n
[xmpp] [xmpp]
xmpp_daemon=prosody
xmpp_use_ispv6=n xmpp_use_ispv6=n
xmpp_bosh_max_inactivity=30 xmpp_bosh_max_inactivity=30
xmpp_server_admins=admin@service.com, superuser@service.com xmpp_server_admins=
xmpp_modules_enabled=saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons xmpp_modules_enabled=saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons
xmpp_port_http=5290 xmpp_port_http=5290
xmpp_port_https=5291 xmpp_port_https=5291
......
plugin_paths = {
"/usr/local/lib/prosody/modules",
};
use_libevent = true;
log = {
-- debug = "/var/log/prosody/prosody.dbg",
info = "/var/log/prosody/prosody.log",
error = "/var/log/prosody/prosody.err",
"syslog",
};
use_ipv6 = true;
http_ports = {
5290,
};
https_ports = {
5291,
};
pastebin_ports = {
5292,
};
bosh_ports = {
5280,
};
admins = {
{tmpl_var xmpp_admins}
};
modules_enabled = {
"roster",
"saslauth",
"tls",
"dialback",
"disco",
"carbons",
"pep",
"private",
"blocklist",
"vcard",
"version",
"uptime",
"time",
"ping",
"admin_adhoc",
"mam",
"bosh",
"websocket",
"http_files",
"announce",
"proxy65",
"offline",
"posix",
-- community modules
"webpresence",
-- ??
-- "discoitems",
-- "admin_telnet",
--
-- "stream_management",
-- "message_carbons"
};
modules_disabled = {
};
allow_registration = false;
c2s_require_encryption = false;
s2s_require_encryption = true;
s2s_secure_auth = false;
s2s_insecure_domains = {
"gmail.com",
};
pidfile = "/var/run/prosody/prosody.pid";
authentication = "external";
archive_expires_after = "2w";
statistics = "internal";
certificates = "certs";
bosh_max_inactivity = 60;
consider_bosh_secure = true;
cross_domain_bosh = true;
ssl = {
key = "/etc/prosody/certs/localhost.key",
certificate = "/etc/prosody/certs/localhost.crt",
};
VirtualHost "{tmpl_var main_host}"
certificate = "/etc/prosody/certs/localhost.crt"
Include "/etc/prosody/storage.cfg.lua"
Include "/etc/prosody/global.cfg.lua"
Include "/etc/prosody/hosts/*.lua"
Include "/etc/prosody/status/*.lua"
oid_section = new_oids
[ new_oids ]
# RFC 3920 section 5.1.1 defines this OID
xmppAddr = 1.3.6.1.5.5.7.8.5
# RFC 4985 defines this OID
SRVName = 1.3.6.1.5.5.7.8.7
[ req ]
default_bits = 4096
default_keyfile = {tmpl_var name='domain'}.key
distinguished_name = distinguished_name
req_extensions = v3_extensions
x509_extensions = v3_extensions
# ask about the DN?
prompt = no
[ distinguished_name ]
commonName = {tmpl_var name='domain'}
countryName = {tmpl_var name='ssl_country'}
localityName = {tmpl_var name='ssl_locality'}
organizationName = {tmpl_var name='ssl_organisation'}
organizationalUnitName = {tmpl_var name='ssl_organisation_unit'}
emailAddress = {tmpl_var name='ssl_email'}
[ v3_extensions ]
# for certificate requests (req_extensions)
# and self-signed certificates (x509_extensions)
basicConstraints = CA:TRUE
keyUsage = digitalSignature,keyEncipherment
extendedKeyUsage = serverAuth,clientAuth
subjectAltName = @subject_alternative_name
[ subject_alternative_name ]
# See http://tools.ietf.org/html/draft-ietf-xmpp-3920bis#section-13.7.1.2 for more info.
DNS.0 = {tmpl_var name='domain'}
otherName.0 = xmppAddr;FORMAT:UTF8,UTF8:{tmpl_var name='domain'}
otherName.1 = SRVName;IA5STRING:_xmpp-client.{tmpl_var name='domain'}
otherName.2 = SRVName;IA5STRING:_xmpp-server.{tmpl_var name='domain'}
\ No newline at end of file
storage = "sql"
sql = {
driver = "MySQL";
database = "{tmpl_var db_name}";
host = "{tmpl_var db_host}";
port = {tmpl_var db_port};
username = "{tmpl_var db_username}";
password = "{tmpl_var db_password}";
}
\ No newline at end of file
...@@ -323,7 +323,7 @@ else $current_svc_config = $inst->db->queryOneRecord("SELECT mail_server,web_ser ...@@ -323,7 +323,7 @@ else $current_svc_config = $inst->db->queryOneRecord("SELECT mail_server,web_ser
$conf['services']['mail'] = check_service_config_state('mail_server', $conf['postfix']['installed']); $conf['services']['mail'] = check_service_config_state('mail_server', $conf['postfix']['installed']);
$conf['services']['dns'] = check_service_config_state('dns_server', ($conf['powerdns']['installed'] || $conf['bind']['installed'] || $conf['mydns']['installed'])); $conf['services']['dns'] = check_service_config_state('dns_server', ($conf['powerdns']['installed'] || $conf['bind']['installed'] || $conf['mydns']['installed']));
$conf['services']['web'] = check_service_config_state('web_server', ($conf['apache']['installed'] || $conf['nginx']['installed'])); $conf['services']['web'] = check_service_config_state('web_server', ($conf['apache']['installed'] || $conf['nginx']['installed']));
$conf['services']['xmpp'] = check_service_config_state('xmpp_server', $conf['xmpp']['installed']); $conf['services']['xmpp'] = check_service_config_state('xmpp_server', $conf['metronome']['installed']);
$conf['services']['firewall'] = check_service_config_state('firewall_server', ($conf['ufw']['installed'] || $conf['firewall']['installed'])); $conf['services']['firewall'] = check_service_config_state('firewall_server', ($conf['ufw']['installed'] || $conf['firewall']['installed']));
$conf['services']['vserver'] = check_service_config_state('vserver_server', $conf['services']['vserver']); $conf['services']['vserver'] = check_service_config_state('vserver_server', $conf['services']['vserver']);
$conf['services']['db'] = check_service_config_state('db_server', true); /* Will always offer as MySQL is of course installed on this host as it's a requirement for ISPC to work... */ $conf['services']['db'] = check_service_config_state('db_server', true); /* Will always offer as MySQL is of course installed on this host as it's a requirement for ISPC to work... */
...@@ -462,7 +462,13 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel ...@@ -462,7 +462,13 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel
if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) { if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) {
//** Configure Metronome XMPP //** Configure Metronome XMPP
$inst->configure_xmpp('dont-create-certs'); if($conf['prosody']['installed'] == true) {
swriteln('Configuring Prosody XMPP');
$inst->configure_prosody('dont-create-certs');
} elseif ($conf['metronome']['installed'] == true) {
swriteln('Configuring Metronome XMPP');
$inst->configure_metronome('dont-create-certs');
}
} }
if($conf['services']['firewall'] && $inst->reconfigure_app('Firewall', $reconfigure_services_answer)) { if($conf['services']['firewall'] && $inst->reconfigure_app('Firewall', $reconfigure_services_answer)) {
...@@ -560,7 +566,7 @@ if($reconfigure_services_answer == 'yes') { ...@@ -560,7 +566,7 @@ if($reconfigure_services_answer == 'yes') {
} }
if($conf['services']['xmpp']) { if($conf['services']['xmpp']) {
if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); if($conf['metronome']['installed'] == true && $conf['metronome']['init_script'] != '') system($inst->getinitcommand($conf['metronome']['init_script'], 'restart').' &> /dev/null');
} }
if($conf['services']['proxy']) { if($conf['services']['proxy']) {
......
...@@ -1585,6 +1585,12 @@ $form["tabs"]['xmpp'] = array( ...@@ -1585,6 +1585,12 @@ $form["tabs"]['xmpp'] = array(
//################################# //#################################
// Begin Datatable fields // Begin Datatable fields
//################################# //#################################
'xmpp_daemon' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '20',
'value' => array('prosody' => 'Prosody', 'metronome' => 'Metronome')
),
'xmpp_use_ipv6' => array( 'xmpp_use_ipv6' => array(
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX', 'formtype' => 'CHECKBOX',
......
...@@ -278,6 +278,7 @@ $wb['apps_vhost_enabled_txt'] = 'Apps-vhost enabled'; ...@@ -278,6 +278,7 @@ $wb['apps_vhost_enabled_txt'] = 'Apps-vhost enabled';
$wb['disabled_txt'] = 'Disabled'; $wb['disabled_txt'] = 'Disabled';
$wb['web_settings_txt'] = 'Web Server'; $wb['web_settings_txt'] = 'Web Server';
$wb['xmpp_server_txt'] = 'XMPP Server'; $wb['xmpp_server_txt'] = 'XMPP Server';
$wb['xmpp_daemon_txt'] = 'XMPP Daemon';
$wb['xmpp_use_ipv6_txt'] = 'Use IPv6'; $wb['xmpp_use_ipv6_txt'] = 'Use IPv6';
$wb['xmpp_bosh_max_inactivity_txt'] = 'Max. BOSH inactivity time'; $wb['xmpp_bosh_max_inactivity_txt'] = 'Max. BOSH inactivity time';
$wb['xmpp_bosh_timeout_range_wrong'] = 'Please enter a bosh timeout range between 15 - 360'; $wb['xmpp_bosh_timeout_range_wrong'] = 'Please enter a bosh timeout range between 15 - 360';
......
...@@ -277,6 +277,7 @@ $wb['php_ini_check_minutes_info_txt'] = '0 = no check'; ...@@ -277,6 +277,7 @@ $wb['php_ini_check_minutes_info_txt'] = '0 = no check';
$wb['enable_spdy_txt'] = 'Makes SPDY available'; $wb['enable_spdy_txt'] = 'Makes SPDY available';
$wb['web_settings_txt'] = 'Web Server'; $wb['web_settings_txt'] = 'Web Server';
$wb['xmpp_server_txt'] = 'XMPP Server'; $wb['xmpp_server_txt'] = 'XMPP Server';
$wb['xmpp_daemon_txt'] = 'XMPP Daemon';
$wb['xmpp_use_ipv6_txt'] = 'Use IPv6'; $wb['xmpp_use_ipv6_txt'] = 'Use IPv6';
$wb['xmpp_bosh_max_inactivity_txt'] = 'Max. BOSH inactivity time'; $wb['xmpp_bosh_max_inactivity_txt'] = 'Max. BOSH inactivity time';
$wb['xmpp_bosh_timeout_range_wrong'] = 'Please enter a bosh timeout range between 15 - 360'; $wb['xmpp_bosh_timeout_range_wrong'] = 'Please enter a bosh timeout range between 15 - 360';
......
...@@ -4,7 +4,12 @@ ...@@ -4,7 +4,12 @@
<p><tmpl_var name="list_desc_txt"></p> <p><tmpl_var name="list_desc_txt"></p>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='xmpp_daemon_txt'}</label>
<div class="col-sm-9"><select name="xmpp_daemon" id="xmpp_daemon" class="form-control">
{tmpl_var name='xmpp_daemon'}
</select></div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='xmpp_use_ipv6_txt'}</label> <label class="col-sm-3 control-label">{tmpl_var name='xmpp_use_ipv6_txt'}</label>
<div class="col-sm-9"> <div class="col-sm-9">
......
...@@ -99,7 +99,7 @@ class xmpp_plugin { ...@@ -99,7 +99,7 @@ class xmpp_plugin {
// Global server config // Global server config
$tpl = new tpl(); $tpl = new tpl();
$tpl->newTemplate('metronome_conf_global.master'); $tpl->newTemplate('xmpp_metronome_conf_global.master');
$tpl->setVar('ipv6', $xmpp_config['xmpp_use_ipv6']=='y'?'true':'false'); $tpl->setVar('ipv6', $xmpp_config['xmpp_use_ipv6']=='y'?'true':'false');
$tpl->setVar('bosh_timeout', intval($xmpp_config['xmpp_bosh_max_inactivity'])); $tpl->setVar('bosh_timeout', intval($xmpp_config['xmpp_bosh_max_inactivity']));
$tpl->setVar('port_http', intval($xmpp_config['xmpp_port_http'])); $tpl->setVar('port_http', intval($xmpp_config['xmpp_port_http']));
...@@ -144,7 +144,7 @@ class xmpp_plugin { ...@@ -144,7 +144,7 @@ class xmpp_plugin {
// Create main host file // Create main host file
$tpl = new tpl(); $tpl = new tpl();
$tpl->newTemplate('metronome_conf_host.master'); $tpl->newTemplate('xmpp_metronome_conf_host.master');
$tpl->setVar('domain', $data['new']['domain']); $tpl->setVar('domain', $data['new']['domain']);
$tpl->setVar('active', $data['new']['active'] == 'y' ? 'true' : 'false'); $tpl->setVar('active', $data['new']['active'] == 'y' ? 'true' : 'false');
$tpl->setVar('public_registration', $data['new']['public_registration'] == 'y' ? 'true' : 'false'); $tpl->setVar('public_registration', $data['new']['public_registration'] == 'y' ? 'true' : 'false');
...@@ -213,7 +213,7 @@ class xmpp_plugin { ...@@ -213,7 +213,7 @@ class xmpp_plugin {
// Create status host file // Create status host file
if($data['new']['use_status_host']=='y'){ if($data['new']['use_status_host']=='y'){
$tpl = new tpl; $tpl = new tpl;
$tpl->newTemplate('metronome_conf_status.master'); $tpl->newTemplate('xmpp_metronome_conf_status.master');
$tpl->setVar('domain', $data['new']['domain']); $tpl->setVar('domain', $data['new']['domain']);
$tpl->setVar('status_hosts', "\t\t\"".implode("\",\n\t\t\"",$status_hosts)."\"\n"); $tpl->setVar('status_hosts', "\t\t\"".implode("\",\n\t\t\"",$status_hosts)."\"\n");
$tpl->setVar('status_comps', "\t\t\"".implode("\",\n\t\t\"",$status_comps)."\"\n"); $tpl->setVar('status_comps', "\t\t\"".implode("\",\n\t\t\"",$status_comps)."\"\n");
...@@ -301,7 +301,7 @@ class xmpp_plugin { ...@@ -301,7 +301,7 @@ class xmpp_plugin {
// Write new CNF file // Write new CNF file
$tpl = new tpl(); $tpl = new tpl();
$tpl->newTemplate('metronome_conf_ssl.master'); $tpl->newTemplate('xmpp_metronome_conf_ssl.master');
$tpl->setVar('domain', $domain); $tpl->setVar('domain', $domain);
$tpl->setVar('ssl_country', $data['new']['ssl_country']); $tpl->setVar('ssl_country', $data['new']['ssl_country']);
$tpl->setVar('ssl_locality', $data['new']['ssl_locality']); $tpl->setVar('ssl_locality', $data['new']['ssl_locality']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment