Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Apr 23, 2024
1 parent 4ca2496 commit 3909f79
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions web/app/Actions/CreateLinuxWebUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ public function handle()
$username = $this->username;
$password = $this->password;

$command = 'adduser --disabled-password --gecos "" "'.$username.'"';
$command = 'sudo adduser --disabled-password --gecos "" "'.$username.'"';
$output .= shell_exec($command);

$command = 'usermod -a -G www-data '.$username;
$command = 'sudo usermod -a -G www-data '.$username;
$output .= shell_exec($command);

$command = 'echo '.$username.':'.$password.' | chpasswd -e';
$command = 'sudo echo '.$username.':'.$password.' | chpasswd -e';
$output .= shell_exec($command);

$command = 'chmod 711 /home/'.$username;
$command = 'sudo chmod 711 /home/'.$username;
$output .= shell_exec($command);

return $output;
Expand Down
7 changes: 6 additions & 1 deletion web/app/Installers/Server/Applications/DovecotInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ public function setLogFilePath($path)

public function install()
{

$commands = [];
$commands[] = 'echo "Installing dovecot..."';
$commands[] = 'apt-get install -y telnet dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd';



// /var/lib/roundcube
// wget https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz
// $commands[] = 'apt-get install -y roundcube roundcube-core roundcube-mysql roundcube-plugins';

$shellFileContent = '';
foreach ($commands as $command) {
$shellFileContent .= $command . PHP_EOL;
Expand Down
2 changes: 1 addition & 1 deletion web/app/Models/HostingSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private function _createLinuxWebUser($model): array
$createLinuxWebUser = new CreateLinuxWebUser();
$createLinuxWebUser->setUsername($systemUsername);
$createLinuxWebUser->setPassword($systemPassword);
$createLinuxWebUserOutput = $createLinuxWebUser->handle();
$createLinuxWebUserOutput = $createLinuxWebUser->handle();

if (strpos($createLinuxWebUserOutput, 'Creating home directory') !== false) {

Expand Down

0 comments on commit 3909f79

Please sign in to comment.