Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jorge Muñoz
ISPConfig 3
Commits
418f62f4
Commit
418f62f4
authored
9 years ago
by
Florian Schaal
Browse files
Options
Downloads
Patches
Plain Diff
add option to reoonfigure selected services during update
parent
35a93a75
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
install/lib/installer_base.lib.php
+13
-0
13 additions, 0 deletions
install/lib/installer_base.lib.php
install/update.php
+55
-45
55 additions, 45 deletions
install/update.php
with
68 additions
and
45 deletions
install/lib/installer_base.lib.php
+
13
−
0
View file @
418f62f4
...
@@ -175,6 +175,19 @@ class installer_base {
...
@@ -175,6 +175,19 @@ class installer_base {
return
$force
;
return
$force
;
}
}
public
function
reconfigure_app
(
$service
,
$reconfigure_services_answer
)
{
$reconfigure
=
false
;
if
(
$reconfigure_services_answer
!=
'selected'
)
{
$reconfigure
=
true
;
}
else
{
if
(
strtolower
(
$this
->
simple_query
(
"Reconfigure
$service
"
,
array
(
'y'
,
'n'
),
'y'
)
)
==
'y'
)
{
$reconfigure
=
true
;
}
else
{
swriteln
(
"Skip reconfigure
$service
\n
"
);
}
}
return
$reconfigure
;
}
/** Create the database for ISPConfig */
/** Create the database for ISPConfig */
...
...
This diff is collapsed.
Click to expand it.
install/update.php
+
55
−
45
View file @
418f62f4
...
@@ -300,30 +300,35 @@ if($reconfigure_master_database_rights_answer == 'yes') {
...
@@ -300,30 +300,35 @@ if($reconfigure_master_database_rights_answer == 'yes') {
//}
//}
//** Shall the services be reconfigured during update
//** Shall the services be reconfigured during update
$reconfigure_services_answer
=
$inst
->
simple_query
(
'Reconfigure Services?'
,
array
(
'yes'
,
'no'
),
'yes'
,
'reconfigure_services'
);
$reconfigure_services_answer
=
$inst
->
simple_query
(
'Reconfigure Services?'
,
array
(
'yes'
,
'no'
,
'selected'
),
'yes'
,
'reconfigure_services'
);
if
(
$reconfigure_services_answer
==
'yes'
)
{
if
(
$reconfigure_services_answer
==
'yes'
||
$reconfigure_services_answer
==
'selected'
)
{
if
(
$conf
[
'services'
][
'mail'
])
{
if
(
$conf
[
'services'
][
'mail'
])
{
//** Configure postfix
//** Configure postfix
swriteln
(
'Configuring Postfix'
);
if
(
$inst
->
reconfigure_app
(
'Postfix'
,
$reconfigure_services_answer
))
{
$inst
->
configure_postfix
(
'dont-create-certs'
);
swriteln
(
'Configuring Postfix'
);
$inst
->
configure_postfix
(
'dont-create-certs'
);
}
//** Configure mailman
//** Configure mailman
if
(
$conf
[
'mailman'
][
'installed'
]
==
true
)
{
if
(
$conf
[
'mailman'
][
'installed'
]
==
true
&&
$inst
->
reconfigure_app
(
'Mailman'
,
$reconfigure_services_answer
)
)
{
swriteln
(
'Configuring Mailman'
);
swriteln
(
'Configuring Mailman'
);
$inst
->
configure_mailman
(
'update'
);
$inst
->
configure_mailman
(
'update'
);
}
}
//* Configure Jailkit
//* Configure Jailkit
swriteln
(
'Configuring Jailkit'
);
if
(
$inst
->
reconfigure_app
(
'Jailkit'
,
$reconfigure_services_answer
))
{
$inst
->
configure_jailkit
();
swriteln
(
'Configuring Jailkit'
);
$inst
->
configure_jailkit
();
}
if
(
$conf
[
'dovecot'
][
'installed'
]
==
true
)
{
if
(
$conf
[
'dovecot'
][
'installed'
]
==
true
&&
$inst
->
reconfigure_app
(
'Dovecot'
,
$reconfigure_services_answer
)
)
{
//* Configure dovecot
//* Configure dovecot
swriteln
(
'Configuring Dovecot'
);
swriteln
(
'Configuring Dovecot'
);
$inst
->
configure_dovecot
();
$inst
->
configure_dovecot
();
}
else
{
}
else
if
(
$conf
[
'courier'
][
'installed'
]
==
true
&&
$inst
->
reconfigure_app
(
'Courier'
,
$reconfigure_services_answer
))
{
//** Configure saslauthd
//** Configure saslauthd
swriteln
(
'Configuring SASL'
);
swriteln
(
'Configuring SASL'
);
$inst
->
configure_saslauthd
();
$inst
->
configure_saslauthd
();
...
@@ -338,27 +343,25 @@ if($reconfigure_services_answer == 'yes') {
...
@@ -338,27 +343,25 @@ if($reconfigure_services_answer == 'yes') {
}
}
//** Configure Spamasassin
//** Configure Spamasassin
swriteln
(
'Configuring Spamassassin'
);
if
(
$inst
->
reconfigure_app
(
'Spamassassin'
,
$reconfigure_services_answer
))
{
$inst
->
configure_spamassassin
();
swriteln
(
'Configuring Spamassassin'
);
$inst
->
configure_spamassassin
();
}
//** Configure Amavis
//** Configure Amavis
if
(
$conf
[
'amavis'
][
'installed'
]
==
true
)
{
if
(
$conf
[
'amavis'
][
'installed'
]
==
true
&&
$inst
->
reconfigure_app
(
'Amavisd'
,
$reconfigure_services_answer
)
)
{
swriteln
(
'Configuring Amavisd'
);
swriteln
(
'Configuring Amavisd'
);
$inst
->
configure_amavis
();
$inst
->
configure_amavis
();
}
}
//** Configure Getmail
//** Configure Getmail
swriteln
(
'Configuring Getmail'
);
if
(
$inst
->
reconfigure_app
(
'Getmail'
,
$reconfigure_services_answer
))
{
$inst
->
configure_getmail
();
swriteln
(
'Configuring Getmail'
);
}
$inst
->
configure_getmail
();
}
if
(
$conf
[
'services'
][
'web'
]
&&
$conf
[
'pureftpd'
][
'installed'
]
==
true
)
{
//** Configure Pureftpd
swriteln
(
'Configuring Pureftpd'
);
$inst
->
configure_pureftpd
();
}
}
if
(
$conf
[
'services'
][
'dns'
])
{
if
(
$conf
[
'services'
][
'dns'
]
&&
$inst
->
reconfigure_app
(
'DNS'
,
$reconfigure_services_answer
)
)
{
//* Configure DNS
//* Configure DNS
if
(
$conf
[
'powerdns'
][
'installed'
]
==
true
)
{
if
(
$conf
[
'powerdns'
][
'installed'
]
==
true
)
{
swriteln
(
'Configuring PowerDNS'
);
swriteln
(
'Configuring PowerDNS'
);
...
@@ -373,37 +376,40 @@ if($reconfigure_services_answer == 'yes') {
...
@@ -373,37 +376,40 @@ if($reconfigure_services_answer == 'yes') {
}
}
if
(
$conf
[
'services'
][
'web'
])
{
if
(
$conf
[
'services'
][
'web'
])
{
if
(
$conf
[
'webserver'
][
'server_type'
]
==
'apache'
){
//** Configure Apache
if
(
$conf
[
'pureftpd'
][
'installed'
]
==
true
&&
$inst
->
reconfigure_app
(
'Pureftpd'
,
$reconfigure_services_answer
))
{
swriteln
(
'Configuring Apache'
);
//** Configure Pureftpd
$inst
->
configure_apache
();
swriteln
(
'Configuring Pureftpd'
);
$inst
->
configure_pureftpd
();
//** Configure vlogger
swriteln
(
'Configuring vlogger'
);
$inst
->
configure_vlogger
();
}
else
{
//** Configure nginx
swriteln
(
'Configuring nginx'
);
$inst
->
configure_nginx
();
}
}
//** Configure apps vhost
if
(
$inst
->
reconfigure_app
(
'Web-Server'
,
$reconfigure_services_answer
))
{
swriteln
(
'Configuring Apps vhost'
);
if
(
$conf
[
'webserver'
][
'server_type'
]
==
'apache'
){
$inst
->
configure_apps_vhost
();
//** Configure Apache
}
swriteln
(
'Configuring Apache'
);
$inst
->
configure_apache
();
//** Configure vlogger
swriteln
(
'Configuring vlogger'
);
$inst
->
configure_vlogger
();
}
else
{
//** Configure nginx
swriteln
(
'Configuring nginx'
);
$inst
->
configure_nginx
();
}
//** Configure apps vhost
swriteln
(
'Configuring Apps vhost'
);
$inst
->
configure_apps_vhost
();
}
}
if
(
$conf
[
'services'
][
'xmpp'
])
{
if
(
$conf
[
'services'
][
'xmpp'
]
&&
$inst
->
reconfigure_app
(
'XMPP'
,
$reconfigure_services_answer
)
)
{
//** Configure Metronome XMPP
//** Configure Metronome XMPP
$inst
->
configure_xmpp
(
'dont-create-certs'
);
$inst
->
configure_xmpp
(
'dont-create-certs'
);
}
}
if
(
$conf
[
'services'
][
'firewall'
]
&&
$inst
->
reconfigure_app
(
'Firewall'
,
$reconfigure_services_answer
))
{
//* Configure DBServer
swriteln
(
'Configuring Database'
);
$inst
->
configure_dbserver
();
if
(
$conf
[
'services'
][
'firewall'
])
{
if
(
$conf
[
'ufw'
][
'installed'
]
==
true
)
{
if
(
$conf
[
'ufw'
][
'installed'
]
==
true
)
{
//* Configure Ubuntu Firewall
//* Configure Ubuntu Firewall
$conf
[
'services'
][
'firewall'
]
=
true
;
$conf
[
'services'
][
'firewall'
]
=
true
;
...
@@ -416,6 +422,10 @@ if($reconfigure_services_answer == 'yes') {
...
@@ -416,6 +422,10 @@ if($reconfigure_services_answer == 'yes') {
}
}
}
}
//* Configure DBServer
swriteln
(
'Configuring Database'
);
$inst
->
configure_dbserver
();
/*
/*
if($conf['squid']['installed'] == true) {
if($conf['squid']['installed'] == true) {
swriteln('Configuring Squid');
swriteln('Configuring Squid');
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment