Commit 1a14f4d8 authored by tbrehm's avatar tbrehm

Fixed #250. Services are only restarted if a startscript is defined in the...

Fixed #250. Services are only restarted if a startscript is defined in the $config variable during installation or update.
parent 59cfc6ee
......@@ -55,9 +55,9 @@ $conf['getmail']['program'] = '/usr/bin/getmail';
$conf['courier']['config_dir'] = '/etc/authlib';
$conf['courier']['courier-authdaemon'] = 'courier-authlib';
$conf['courier']['courier-imap'] = 'courier-imap';
$conf['courier']['courier-imap-ssl'] = 'courier-imap';
$conf['courier']['courier-pop'] = 'courier-imap';
$conf['courier']['courier-pop-ssl'] = 'courier-imap';
$conf['courier']['courier-imap-ssl'] = '';
$conf['courier']['courier-pop'] = '';
$conf['courier']['courier-pop-ssl'] = '';
//* SASL
$conf['saslauthd']['config'] = '/etc/sysconfig/saslauthd';
......
......@@ -203,19 +203,19 @@ if($install_mode == 'Standard') {
$inst->install_crontab();
swriteln('Restarting services ...');
system($conf['init_scripts'].'/'.$conf['mysql']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['postfix']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['saslauthd']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['amavis']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['clamav']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-authdaemon'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-imap'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-imap-ssl'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-pop'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-pop-ssl'].' restart');
system($conf['init_scripts'].'/'.$conf['apache']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['pureftpd']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['mydns']['init_script'].' restart &> /dev/null');
if($conf['mysql']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['mysql']['init_script'].' restart');
if($conf['postfix']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['postfix']['init_script'].' restart');
if($conf['saslauthd']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['saslauthd']['init_script'].' restart');
if($conf['amavis']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['amavis']['init_script'].' restart');
if($conf['clamav']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['clamav']['init_script'].' restart');
if($conf['courier']['courier-authdaemon'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-authdaemon'].' restart');
if($conf['courier']['courier-imap'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-imap'].' restart');
if($conf['courier']['courier-imap-ssl'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-imap-ssl'].' restart');
if($conf['courier']['courier-pop'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-pop'].' restart');
if($conf['courier']['courier-pop-ssl'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-pop-ssl'].' restart');
if($conf['apache']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['apache']['init_script'].' restart');
if($conf['pureftpd']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['pureftpd']['init_script'].' restart');
if($conf['mydns']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['mydns']['init_script'].' restart &> /dev/null');
}else{
......@@ -261,15 +261,15 @@ if($install_mode == 'Standard') {
swriteln('Configuring Getmail');
$inst->configure_getmail();
system($conf['init_scripts'].'/'.$conf['postfix']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['saslauthd']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['amavis']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['clamav']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-authdaemon'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-imap'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-imap-ssl'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-pop'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-pop-ssl'].' restart');
if($conf['postfix']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['postfix']['init_script'].' restart');
if($conf['saslauthd']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['saslauthd']['init_script'].' restart');
if($conf['amavis']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['amavis']['init_script'].' restart');
if($conf['clamav']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['clamav']['init_script'].' restart');
if($conf['courier']['courier-authdaemon'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-authdaemon'].' restart');
if($conf['courier']['courier-imap'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-imap'].' restart');
if($conf['courier']['courier-imap-ssl'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-imap-ssl'].' restart');
if($conf['courier']['courier-pop'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-pop'].' restart');
if($conf['courier']['courier-pop-ssl'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-pop-ssl'].' restart');
}
//** Configure Jailkit
......@@ -282,14 +282,14 @@ if($install_mode == 'Standard') {
if(strtolower($inst->simple_query('Configure FTP Server', array('y','n'),'y') ) == 'y') {
swriteln('Configuring Pureftpd');
$inst->configure_pureftpd();
system($conf['init_scripts'].'/'.$conf['pureftpd']['init_script'].' restart');
if($conf['pureftpd']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['pureftpd']['init_script'].' restart');
}
//** Configure MyDNS
if(strtolower($inst->simple_query('Configure DNS Server',array('y','n'),'y')) == 'y') {
swriteln('Configuring MyDNS');
$inst->configure_mydns();
system($conf['init_scripts'].'/'.$conf['mydns']['init_script'].' restart');
if($conf['mydns']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['mydns']['init_script'].' restart &> /dev/null');
}
//** Configure Apache
......@@ -341,7 +341,7 @@ if($install_mode == 'Standard') {
//* Configure ISPConfig
swriteln('Installing Crontab');
$inst->install_crontab();
system($conf['init_scripts'].'/'.$conf['apache']['init_script'].' restart');
if($conf['apache']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['apache']['init_script'].' restart');
......
......@@ -250,19 +250,19 @@ if($update_crontab_answer == 'yes') {
//** Restart services:
if($reconfigure_services_answer == 'yes') {
swriteln('Restarting services ...');
system($conf['init_scripts'].'/'.$conf['mysql']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['postfix']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['saslauthd']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['amavis']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['clamav']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-authdaemon'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-imap'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-imap-ssl'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-pop'].' restart');
system($conf['init_scripts'].'/'.$conf['courier']['courier-pop-ssl'].' restart');
system($conf['init_scripts'].'/'.$conf['apache']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['pureftpd']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['mydns']['init_script'].' restart &> /dev/null');
if($conf['mysql']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['mysql']['init_script'].' restart');
if($conf['postfix']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['postfix']['init_script'].' restart');
if($conf['saslauthd']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['saslauthd']['init_script'].' restart');
if($conf['amavis']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['amavis']['init_script'].' restart');
if($conf['clamav']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['clamav']['init_script'].' restart');
if($conf['courier']['courier-authdaemon'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-authdaemon'].' restart');
if($conf['courier']['courier-imap'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-imap'].' restart');
if($conf['courier']['courier-imap-ssl'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-imap-ssl'].' restart');
if($conf['courier']['courier-pop'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-pop'].' restart');
if($conf['courier']['courier-pop-ssl'] != '') system($conf['init_scripts'].'/'.$conf['courier']['courier-pop-ssl'].' restart');
if($conf['apache']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['apache']['init_script'].' restart');
if($conf['pureftpd']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['pureftpd']['init_script'].' restart');
if($conf['mydns']['init_script'] != '') system($conf['init_scripts'].'/'.$conf['mydns']['init_script'].' restart &> /dev/null');
}
echo "Update finished.\n";
......
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