| | |
| | | } |
| | | |
| | | |
| | | public function configure_xmpp() { |
| | | public function configure_xmpp($options = '') { |
| | | global $conf; |
| | | |
| | | if($conf['xmpp']['installed'] == false) return; |
| | |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | wf($full_file_name, $content); |
| | | |
| | | if(!stristr($options, 'dont-create-certs')){ |
| | | // Create SSL Certificate for localhost |
| | | echo "writing new private key to 'localhost.key'\n-----\n"; |
| | | $ssl_country = $this->free_query('Country Name (2 letter code)', 'AU'); |
| | |
| | | exec("(cd /etc/metronome/certs && make localhost.cert)"); |
| | | exec('chmod 0400 /etc/metronome/certs/localhost.key'); |
| | | exec('chown metronome /etc/metronome/certs/localhost.key'); |
| | | }else{ |
| | | echo "-----\n"; |
| | | echo "Metronome XMPP SSL server certificate is not renewed. Run the following command manual as root to recreate it:\n"; |
| | | echo "# (cd /etc/metronome/certs && make localhost.key && make localhost.csr && make localhost.cert && chmod 0400 localhost.key && chown metronome localhost.key)\n"; |
| | | echo "-----\n"; |
| | | } |
| | | |
| | | // Copy init script |
| | | caselog('cp -f apps/metronome-init /etc/init.d/metronome', __FILE__, __LINE__); |