Skip to content

Commit 793f323

Browse files
committed
Fixed: FS#1335 - PHP warnings during update
1 parent 511e608 commit 793f323

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

install/lib/installer_base.lib.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ public function configure_saslauthd() {
605605

606606

607607
// Recursively create the spool directory
608-
mkdir('/var/spool/postfix/var/run/saslauthd', 0755, true);
608+
if(!@is_dir('/var/spool/postfix/var/run/saslauthd')) mkdir('/var/spool/postfix/var/run/saslauthd', 0755, true);
609609

610610
// Edit the file /etc/default/saslauthd
611611
$configfile = $conf['saslauthd']['config'];
@@ -820,7 +820,7 @@ public function configure_getmail() {
820820

821821
$config_dir = $conf['getmail']['config_dir'];
822822

823-
if(!is_dir($config_dir)) mkdir(escapeshellcmd($config_dir), 0700, true);
823+
if(!@is_dir($config_dir)) mkdir(escapeshellcmd($config_dir), 0700, true);
824824

825825
$command = 'useradd -d '.$config_dir.' getmail';
826826
if(!is_user('getmail')) caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
@@ -949,7 +949,7 @@ public function configure_bind() {
949949

950950
//* Create the slave subdirectory
951951
$content .= 'slave';
952-
mkdir($content, 0770, true);
952+
if(!@is_dir($content)) mkdir($content, 0770, true);
953953

954954
//* Chown the slave subdirectory to $conf['bind']['bind_user']
955955
chown($content, $conf['bind']['bind_user']);
@@ -963,7 +963,7 @@ public function configure_apache() {
963963
global $conf;
964964

965965
//* Create the logging directory for the vhost logfiles
966-
mkdir($conf['ispconfig_log_dir'].'/httpd', 0755, true);
966+
if(!@is_dir($conf['ispconfig_log_dir'].'/httpd')) mkdir($conf['ispconfig_log_dir'].'/httpd', 0755, true);
967967

968968
if(is_file('/etc/suphp/suphp.conf')) {
969969
replaceLine('/etc/suphp/suphp.conf','php=php:/usr/bin','x-httpd-suphp="php:/usr/bin/php-cgi"',0);
@@ -1127,7 +1127,7 @@ public function configure_apps_vhost() {
11271127
$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group;
11281128
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
11291129

1130-
mkdir($install_dir, 0755, true);
1130+
if(!@is_dir($install_dir)) mkdir($install_dir, 0755, true);
11311131
chown($install_dir, $apps_vhost_user);
11321132
chgrp($install_dir, $apps_vhost_group);
11331133

@@ -1182,7 +1182,7 @@ public function make_ispconfig_ssl_cert() {
11821182
$ssl_csr_file = $install_dir.'/interface/ssl/ispserver.csr';
11831183
$ssl_key_file = $install_dir.'/interface/ssl/ispserver.key';
11841184

1185-
if(!is_dir($install_dir.'/interface/ssl')) mkdir($install_dir.'/interface/ssl', 0755, true);
1185+
if(!@is_dir($install_dir.'/interface/ssl')) mkdir($install_dir.'/interface/ssl', 0755, true);
11861186

11871187
$ssl_pw = substr(md5(mt_rand()),0,6);
11881188
exec("openssl genrsa -des3 -passout pass:$ssl_pw -out $ssl_key_file 4096");

0 commit comments

Comments
 (0)