Skip to content

Commit 1b063ee

Browse files
committed
Moved server modules and plugins to new directory and updated the installer to create the symlinks for the modules and plugins from *-available to *-enabled directory.
Fixed a typo in mailfilter template.
1 parent be40ba3 commit 1b063ee

13 files changed

+30
-9
lines changed

install/lib/installer_base.lib.php

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct()
4242
$this->conf = $conf;
4343
}
4444

45-
//TODO uh ?
45+
//: TODO Implement the translation function and langauge files for the installer.
4646
public function lng($text)
4747
{
4848
return $text;
@@ -100,19 +100,15 @@ public function free_query($query,$default)
100100
return $answer;
101101
}
102102

103+
/*
103104
// TODO: this function is not used atmo I think - pedro
104105
function request_language(){
105106
106107
swriteln(lng('Enter your language'));
107108
swriteln(lng('de, en'));
108109
109-
/*
110-
do {
111-
$lang = sread(2);
112-
} while (!$this->check_break($lang) or $this->
113-
*/
114-
115110
}
111+
*/
116112

117113
/** Create the database for ISPConfig */
118114
public function configure_database()
@@ -608,6 +604,31 @@ public function install_ispconfig()
608604
$content = str_replace('{server_id}', $this->conf['server_id'], $content);
609605
wf("$install_dir/server/lib/$configfile", $content);
610606

607+
//* Enable the server modules and plugins.
608+
// TODO: Implement a selector which modules and plugins shall be enabled.
609+
$dir = $install_dir.'/server/mods-available/';
610+
if (is_dir($dir)) {
611+
if ($dh = opendir($dir)) {
612+
while (($file = readdir($dh)) !== false) {
613+
if($file != '.' && $file != '..') {
614+
symlink($install_dir.'/server/mods-enabled/'.$file,$install_dir.'/server/mods-available/'.$file)
615+
}
616+
}
617+
closedir($dh);
618+
}
619+
}
620+
621+
$dir = $install_dir.'/server/plugins-available/';
622+
if (is_dir($dir)) {
623+
if ($dh = opendir($dir)) {
624+
while (($file = readdir($dh)) !== false) {
625+
if($file != '.' && $file != '..') {
626+
symlink($install_dir.'/server/plugins-enabled/'.$file,$install_dir.'/server/plugins-available/'.$file)
627+
}
628+
}
629+
closedir($dh);
630+
}
631+
}
611632

612633
//* Chmod the files
613634
$command = "chmod -R 750 $install_dir";
@@ -632,7 +653,7 @@ public function install_ispconfig()
632653
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
633654

634655
//* Copy the ISPConfig vhost for the controlpanel
635-
//TODO These are missing! should they be "vhost_dist_*_dir" ?
656+
// TODO: These are missing! should they be "vhost_dist_*_dir" ?
636657
$vhost_conf_dir = $this->conf['apache']['vhost_conf_dir'];
637658
$vhost_conf_enabled_dir = $this->conf['apache']['vhost_conf_enabled_dir'];
638659
copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");

install/tpl/mailfilter.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if ( $RETURNCODE == 0 )
5050

5151

5252
#
53-
# Check that user has his own maildrop include,
53+
# Test if the user has his own maildrop include,
5454
# if not available, check if $DEFAULT is set
5555
# (newer maildrop get's that from the DB and updates
5656
# it) and deliver or fail temporarily if not available
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)