@@ -439,6 +439,16 @@ function configure_spamassassin() {
439439 wf ($ configfile ,$ content );
440440 }
441441
442+ function configure_getmail () {
443+ global $ conf ;
444+
445+ $ command = "useradd -b /etc/getmail -d /etc/getmail getmail " ;
446+ caselog ($ command ." &> /dev/null " , __FILE__ , __LINE__ ,"EXECUTED: " .$ command ,"Failed to execute the command " .$ command );
447+
448+ $ command = "chmod -R 700 /etc/getmail " ;
449+ caselog ($ command ." &> /dev/null " , __FILE__ , __LINE__ ,"EXECUTED: " .$ command ,"Failed to execute the command " .$ command );
450+ }
451+
442452
443453 function install_ispconfig () {
444454 global $ conf ;
@@ -466,7 +476,7 @@ function install_ispconfig() {
466476 $ command = "ln -s " .$ conf ["ispconfig_install_dir " ]."/interface/web/ /var/www/ispconfig " ;
467477 caselog ($ command ." &> /dev/null " , __FILE__ , __LINE__ ,"EXECUTED: " .$ command ,"Failed to execute the command " .$ command );
468478
469- // Create the config file for ISPConfig
479+ // Create the config file for ISPConfig interface
470480 $ configfile = 'config.inc.php ' ;
471481 if (is_file ($ conf ["ispconfig_install_dir " ].'/interface/lib/ ' .$ configfile )) copy ($ conf ["ispconfig_install_dir " ].'/interface/lib/ ' .$ configfile ,$ conf ["ispconfig_install_dir " ].'/interface/lib/ ' .$ configfile .'~ ' );
472482 $ content = rf ("tpl/ " .$ configfile .".master " );
@@ -476,6 +486,17 @@ function install_ispconfig() {
476486 $ content = str_replace ('{mysql_server_host} ' ,$ conf ["mysql_server_host " ],$ content );
477487 wf ($ conf ["ispconfig_install_dir " ].'/interface/lib/ ' .$ configfile ,$ content );
478488
489+ // Create the config file for ISPConfig server
490+ $ configfile = 'config.inc.php ' ;
491+ if (is_file ($ conf ["ispconfig_install_dir " ].'/server/lib/ ' .$ configfile )) copy ($ conf ["ispconfig_install_dir " ].'/server/lib/ ' .$ configfile ,$ conf ["ispconfig_install_dir " ].'/interface/lib/ ' .$ configfile .'~ ' );
492+ $ content = rf ("tpl/ " .$ configfile .".master " );
493+ $ content = str_replace ('{mysql_server_ispconfig_user} ' ,$ conf ["mysql_server_ispconfig_user " ],$ content );
494+ $ content = str_replace ('{mysql_server_ispconfig_password} ' ,$ conf ["mysql_server_ispconfig_password " ],$ content );
495+ $ content = str_replace ('{mysql_server_database} ' ,$ conf ["mysql_server_database " ],$ content );
496+ $ content = str_replace ('{mysql_server_host} ' ,$ conf ["mysql_server_host " ],$ content );
497+ wf ($ conf ["ispconfig_install_dir " ].'/server/lib/ ' .$ configfile ,$ content );
498+
499+
479500 // Chmod the files
480501 $ command = "chmod -R 750 " .$ conf ["ispconfig_install_dir " ];
481502 caselog ($ command ." &> /dev/null " , __FILE__ , __LINE__ ,"EXECUTED: " .$ command ,"Failed to execute the command " .$ command );
@@ -491,6 +512,9 @@ function install_ispconfig() {
491512 $ command = "adduser www-data ispconfig " ;
492513 caselog ($ command ." &> /dev/null " , __FILE__ , __LINE__ ,"EXECUTED: " .$ command ,"Failed to execute the command " .$ command );
493514
515+ // Make the shell scripts executable
516+ $ command = "chmod +x " .$ conf ["ispconfig_install_dir " ]."/server/scripts/*.sh " ;
517+ caselog ($ command ." &> /dev/null " , __FILE__ , __LINE__ ,"EXECUTED: " .$ command ,"Failed to execute the command " .$ command );
494518
495519 }
496520
0 commit comments