fix(install) : make it as sudo
This commit is contained in:
parent
c8b6f72be4
commit
b7e9ce60f7
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass)
|
||||||
throw new Exception('You need an username AND a password to add a herse.');
|
throw new Exception('You need an username AND a password to add a herse.');
|
||||||
} else {
|
} else {
|
||||||
// add password file to domain
|
// add password file to domain
|
||||||
exec('mkdir -p /home'.'/'.$user.'/'.$domain);
|
exec('sudo -u '.$user.' mkdir -p /home'.'/'.$user.'/'.$domain);
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
'/home'.'/'.$user.'/'.$domain.'/.htpasswd',
|
'/home'.'/'.$user.'/'.$domain.'/.htpasswd',
|
||||||
$herseUser.':'.password_hash($hersePass, PASSWORD_BCRYPT)
|
$herseUser.':'.password_hash($hersePass, PASSWORD_BCRYPT)
|
||||||
|
|
Loading…
Reference in a new issue