Skip to content

Commit 7e1cfbe

Browse files
committed
- Fixed FS#2198.
1 parent 105a2ae commit 7e1cfbe

File tree

4 files changed

+31
-43
lines changed

4 files changed

+31
-43
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ public function install_ispconfig()
902902
$command = "chmod +x $install_dir/server/scripts/*.sh";
903903
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
904904

905-
if($conf['apache']['installed'] == true){
905+
if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
906906
//* Copy the ISPConfig vhost for the controlpanel
907907
// TODO: These are missing! should they be "vhost_dist_*_dir" ?
908908
$vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
@@ -930,7 +930,7 @@ public function install_ispconfig()
930930

931931
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
932932
//* and create the symlink
933-
if($this->install_ispconfig_interface == true && $this->is_update == false) {
933+
if($this->is_update == false) {
934934
if(@is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) unlink("$vhost_conf_enabled_dir/ispconfig.vhost");
935935
if(!@is_link("$vhost_conf_enabled_dir/000-ispconfig.vhost")) {
936936
exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/000-ispconfig.vhost");
@@ -944,18 +944,9 @@ public function install_ispconfig()
944944

945945
replaceLine('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter','PHPRC=','PHPRC=/etc/',0,0);
946946
}
947-
948-
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
949-
//* and create the symlink
950-
if($this->install_ispconfig_interface == true && $this->is_update == false) {
951-
if(@is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) unlink("$vhost_conf_enabled_dir/ispconfig.vhost");
952-
if(!@is_link("$vhost_conf_enabled_dir/000-ispconfig.vhost")) {
953-
exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/000-ispconfig.vhost");
954-
}
955-
}
956947
}
957948

958-
if($conf['nginx']['installed'] == true){
949+
if($conf['nginx']['installed'] == true && $this->install_ispconfig_interface == true){
959950
//* Copy the ISPConfig vhost for the controlpanel
960951
$vhost_conf_dir = $conf['nginx']['vhost_conf_dir'];
961952
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
@@ -998,7 +989,7 @@ public function install_ispconfig()
998989

999990
//copy('tpl/nginx_ispconfig.vhost.master', $vhost_conf_dir.'/ispconfig.vhost');
1000991
//* and create the symlink
1001-
if($this->install_ispconfig_interface == true && $this->is_update == false) {
992+
if($this->is_update == false) {
1002993
if(@is_link($vhost_conf_enabled_dir.'/ispconfig.vhost')) unlink($vhost_conf_enabled_dir.'/ispconfig.vhost');
1003994
if(!@is_link($vhost_conf_enabled_dir.'/000-ispconfig.vhost')) {
1004995
symlink($vhost_conf_dir.'/ispconfig.vhost',$vhost_conf_enabled_dir.'/000-ispconfig.vhost');

install/dist/lib/gentoo.lib.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ public function configure_apps_vhost()
561561
global $conf;
562562

563563
//* Create the ispconfig apps vhost user and group
564-
if($conf['apache']['installed'] == true){
564+
if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
565565
$apps_vhost_user = escapeshellcmd($conf['web']['apps_vhost_user']);
566566
$apps_vhost_group = escapeshellcmd($conf['web']['apps_vhost_group']);
567567
$install_dir = escapeshellcmd($conf['web']['website_basedir'].'/apps');
@@ -619,7 +619,7 @@ public function configure_apps_vhost()
619619

620620
}
621621
}
622-
if($conf['nginx']['installed'] == true){
622+
if($conf['nginx']['installed'] == true && $this->install_ispconfig_interface == true){
623623
$apps_vhost_user = escapeshellcmd($conf['web']['apps_vhost_user']);
624624
$apps_vhost_group = escapeshellcmd($conf['web']['apps_vhost_group']);
625625
$install_dir = escapeshellcmd($conf['web']['website_basedir'].'/apps');
@@ -684,12 +684,11 @@ public function configure_apps_vhost()
684684

685685
//copy('tpl/nginx_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
686686
//* and create the symlink
687-
if($this->install_ispconfig_interface == true) {
688-
if(@is_link($vhost_conf_enabled_dir.'/apps.vhost')) unlink($vhost_conf_enabled_dir.'/apps.vhost');
689-
if(!@is_link($vhost_conf_enabled_dir.'/000-apps.vhost')) {
690-
symlink($vhost_conf_dir.'/apps.vhost',$vhost_conf_enabled_dir.'/000-apps.vhost');
691-
}
687+
if(@is_link($vhost_conf_enabled_dir.'/apps.vhost')) unlink($vhost_conf_enabled_dir.'/apps.vhost');
688+
if(!@is_link($vhost_conf_enabled_dir.'/000-apps.vhost')) {
689+
symlink($vhost_conf_dir.'/apps.vhost',$vhost_conf_enabled_dir.'/000-apps.vhost');
692690
}
691+
693692
}
694693
}
695694

@@ -904,7 +903,7 @@ public function install_ispconfig()
904903
$command = "chmod +x $install_dir/server/scripts/*.sh";
905904
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
906905

907-
if($conf['apache']['installed'] == true){
906+
if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
908907
//* Copy the ISPConfig vhost for the controlpanel
909908
$content = $this->get_template_file("apache_ispconfig.vhost", true);
910909
$content = str_replace('{vhost_port}', $conf['apache']['vhost_port'], $content);
@@ -936,7 +935,7 @@ public function install_ispconfig()
936935
}
937936
}
938937

939-
if($conf['nginx']['installed'] == true){
938+
if($conf['nginx']['installed'] == true && $this->install_ispconfig_interface == true){
940939
//* Copy the ISPConfig vhost for the controlpanel
941940
$vhost_conf_dir = $conf['nginx']['vhost_conf_dir'];
942941
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
@@ -979,7 +978,7 @@ public function install_ispconfig()
979978

980979
//copy('tpl/nginx_ispconfig.vhost.master', $vhost_conf_dir.'/ispconfig.vhost');
981980
//* and create the symlink
982-
if($this->install_ispconfig_interface == true && $this->is_update == false) {
981+
if($this->is_update == false) {
983982
if(@is_link($vhost_conf_enabled_dir.'/ispconfig.vhost')) unlink($vhost_conf_enabled_dir.'/ispconfig.vhost');
984983
if(!@is_link($vhost_conf_enabled_dir.'/000-ispconfig.vhost')) {
985984
symlink($vhost_conf_dir.'/ispconfig.vhost',$vhost_conf_enabled_dir.'/000-ispconfig.vhost');

install/dist/lib/opensuse.lib.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ public function install_ispconfig()
936936
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
937937

938938

939-
if($conf['apache']['installed'] == true){
939+
if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
940940
//* Copy the ISPConfig vhost for the controlpanel
941941
// TODO: These are missing! should they be "vhost_dist_*_dir" ?
942942
$vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
@@ -976,7 +976,7 @@ public function install_ispconfig()
976976

977977
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
978978
//* and create the symlink
979-
if($this->install_ispconfig_interface == true && $this->is_update == false) {
979+
if($this->is_update == false) {
980980
if(@is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) unlink("$vhost_conf_enabled_dir/ispconfig.vhost");
981981
if(!@is_link("$vhost_conf_enabled_dir/000-ispconfig.vhost")) {
982982
exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/000-ispconfig.vhost");
@@ -988,7 +988,7 @@ public function install_ispconfig()
988988
replaceLine('/usr/local/ispconfig/server/conf/vhost.conf.master',"suPHP_UserGroup"," suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>",0);
989989
}
990990

991-
if($conf['nginx']['installed'] == true){
991+
if($conf['nginx']['installed'] == true && $this->install_ispconfig_interface == true){
992992
//* Copy the ISPConfig vhost for the controlpanel
993993
$vhost_conf_dir = $conf['nginx']['vhost_conf_dir'];
994994
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
@@ -1031,7 +1031,7 @@ public function install_ispconfig()
10311031

10321032
//copy('tpl/nginx_ispconfig.vhost.master', $vhost_conf_dir.'/ispconfig.vhost');
10331033
//* and create the symlink
1034-
if($this->install_ispconfig_interface == true && $this->is_update == false) {
1034+
if($this->is_update == false) {
10351035
if(@is_link($vhost_conf_enabled_dir.'/ispconfig.vhost')) unlink($vhost_conf_enabled_dir.'/ispconfig.vhost');
10361036
if(!@is_link($vhost_conf_enabled_dir.'/000-ispconfig.vhost')) {
10371037
symlink($vhost_conf_dir.'/ispconfig.vhost',$vhost_conf_enabled_dir.'/000-ispconfig.vhost');

install/lib/installer_base.lib.php

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ public function configure_apps_vhost() {
14201420
global $conf;
14211421

14221422
//* Create the ispconfig apps vhost user and group
1423-
if($conf['apache']['installed'] == true){
1423+
if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
14241424
$apps_vhost_user = escapeshellcmd($conf['web']['apps_vhost_user']);
14251425
$apps_vhost_group = escapeshellcmd($conf['web']['apps_vhost_group']);
14261426
$install_dir = escapeshellcmd($conf['web']['website_basedir'].'/apps');
@@ -1469,12 +1469,11 @@ public function configure_apps_vhost() {
14691469

14701470
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
14711471
//* and create the symlink
1472-
if($this->install_ispconfig_interface == true) {
1473-
if(@is_link($vhost_conf_enabled_dir.'/apps.vhost')) unlink($vhost_conf_enabled_dir.'/apps.vhost');
1474-
if(!@is_link($vhost_conf_enabled_dir.'/000-apps.vhost')) {
1475-
symlink($vhost_conf_dir.'/apps.vhost',$vhost_conf_enabled_dir.'/000-apps.vhost');
1476-
}
1472+
if(@is_link($vhost_conf_enabled_dir.'/apps.vhost')) unlink($vhost_conf_enabled_dir.'/apps.vhost');
1473+
if(!@is_link($vhost_conf_enabled_dir.'/000-apps.vhost')) {
1474+
symlink($vhost_conf_dir.'/apps.vhost',$vhost_conf_enabled_dir.'/000-apps.vhost');
14771475
}
1476+
14781477
if(!is_file($conf['web']['website_basedir'].'/php-fcgi-scripts/apps/.php-fcgi-starter')) {
14791478
mkdir($conf['web']['website_basedir'].'/php-fcgi-scripts/apps', 0755, true);
14801479
copy('tpl/apache_apps_fcgi_starter.master',$conf['web']['website_basedir'].'/php-fcgi-scripts/apps/.php-fcgi-starter');
@@ -1483,7 +1482,7 @@ public function configure_apps_vhost() {
14831482

14841483
}
14851484
}
1486-
if($conf['nginx']['installed'] == true){
1485+
if($conf['nginx']['installed'] == true && $this->install_ispconfig_interface == true){
14871486
$apps_vhost_user = escapeshellcmd($conf['web']['apps_vhost_user']);
14881487
$apps_vhost_group = escapeshellcmd($conf['web']['apps_vhost_group']);
14891488
$install_dir = escapeshellcmd($conf['web']['website_basedir'].'/apps');
@@ -1548,12 +1547,11 @@ public function configure_apps_vhost() {
15481547

15491548
//copy('tpl/nginx_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
15501549
//* and create the symlink
1551-
if($this->install_ispconfig_interface == true) {
1552-
if(@is_link($vhost_conf_enabled_dir.'/apps.vhost')) unlink($vhost_conf_enabled_dir.'/apps.vhost');
1553-
if(!@is_link($vhost_conf_enabled_dir.'/000-apps.vhost')) {
1554-
symlink($vhost_conf_dir.'/apps.vhost',$vhost_conf_enabled_dir.'/000-apps.vhost');
1555-
}
1550+
if(@is_link($vhost_conf_enabled_dir.'/apps.vhost')) unlink($vhost_conf_enabled_dir.'/apps.vhost');
1551+
if(!@is_link($vhost_conf_enabled_dir.'/000-apps.vhost')) {
1552+
symlink($vhost_conf_dir.'/apps.vhost',$vhost_conf_enabled_dir.'/000-apps.vhost');
15561553
}
1554+
15571555
}
15581556
}
15591557

@@ -1815,7 +1813,7 @@ public function install_ispconfig() {
18151813
$command = "chmod +x $install_dir/server/scripts/*.sh";
18161814
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
18171815

1818-
if($conf['apache']['installed'] == true){
1816+
if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
18191817
//* Copy the ISPConfig vhost for the controlpanel
18201818
$vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
18211819
$vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
@@ -1841,7 +1839,7 @@ public function install_ispconfig() {
18411839

18421840
//copy('tpl/apache_ispconfig.vhost.master', $vhost_conf_dir.'/ispconfig.vhost');
18431841
//* and create the symlink
1844-
if($this->install_ispconfig_interface == true && $this->is_update == false) {
1842+
if($this->is_update == false) {
18451843
if(@is_link($vhost_conf_enabled_dir.'/ispconfig.vhost')) unlink($vhost_conf_enabled_dir.'/ispconfig.vhost');
18461844
if(!@is_link($vhost_conf_enabled_dir.'/000-ispconfig.vhost')) {
18471845
symlink($vhost_conf_dir.'/ispconfig.vhost',$vhost_conf_enabled_dir.'/000-ispconfig.vhost');
@@ -1857,7 +1855,7 @@ public function install_ispconfig() {
18571855
}
18581856
}
18591857

1860-
if($conf['nginx']['installed'] == true){
1858+
if($conf['nginx']['installed'] == true && $this->install_ispconfig_interface == true){
18611859
//* Copy the ISPConfig vhost for the controlpanel
18621860
$vhost_conf_dir = $conf['nginx']['vhost_conf_dir'];
18631861
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
@@ -1900,7 +1898,7 @@ public function install_ispconfig() {
19001898

19011899
//copy('tpl/nginx_ispconfig.vhost.master', $vhost_conf_dir.'/ispconfig.vhost');
19021900
//* and create the symlink
1903-
if($this->install_ispconfig_interface == true && $this->is_update == false) {
1901+
if($this->is_update == false) {
19041902
if(@is_link($vhost_conf_enabled_dir.'/ispconfig.vhost')) unlink($vhost_conf_enabled_dir.'/ispconfig.vhost');
19051903
if(!@is_link($vhost_conf_enabled_dir.'/000-ispconfig.vhost')) {
19061904
symlink($vhost_conf_dir.'/ispconfig.vhost',$vhost_conf_enabled_dir.'/000-ispconfig.vhost');

0 commit comments

Comments
 (0)