Distribution independent linux commands
Please use distribution independent linux commands. This will be very helpful when creating support for new distributions:
--- ispconfig3_install-3.0.3.2/install/lib/installer_base.lib.php 2010-10-26 16:28:10.000000000 +0200
+++ ispconfig3_install-3.0.3.2-slack/install/lib/installer_base.lib.php 2011-01-16 14:23:15.441034897 +0100
@@ -641,7 +641,7 @@
wf(configfile,
content);
// add the postfix user to the sasl group (at least necessary for Ubuntu 8.04 and most likely Debian Lenny as well.
-
exec('adduser postfix sasl');
-
exec('usermod -a -G sasl postfix'); }
@@ -812,7 +812,7 @@ unset($content);
// Add the clamav user to the amavis group
-
exec('adduser clamav amavis');
-
exec('usermod -a -G amavis clamav'); }
@@ -1143,7 +1143,7 @@
if(!is_user(apps_vhost_user)) caselog(
command.' &> /dev/null 2> /dev/null', FILE, LINE, "EXECUTED: $command", "Failed to execute the command $command");
-
$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group;
-
$command = 'useradd '.$conf['apache']['user'].' -g '.$apps_vhost_group; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!@is_dir($install_dir)) mkdir($install_dir, 0755, true);
@@ -1422,7 +1422,7 @@ // TODO: FIXME: add the www-data user to the ispconfig group. This is just for testing // and must be fixed as this will allow the apache user to read the ispconfig files. // Later this must run as own apache server or via suexec!
-
$command = 'adduser www-data ispconfig';
-
$command = 'usermod -a -G ispconfig www-data'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); //* Make the shell scripts executable