1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 14:44:05 +00:00

Minor changes

This commit is contained in:
Samuel Štancl 2019-02-07 15:04:51 +01:00
parent 9629129772
commit 97ab962cb7

View file

@ -10,9 +10,9 @@ class NginxConfigManager implements ServerConfigManager
public function addVhost(string $domain, string $file): bool
{
$f = fopen($file, 'a');
fwrite($f, $this->getVhostText($domain));
fclose($f);
return true;
$fw = fwrite($f, $this->getVhostText($domain));
$fc = fclose($f);
return $fw && $fc;
}
public function getVhostText(string $domain)
@ -26,10 +26,10 @@ class NginxConfigManager implements ServerConfigManager
config('tenancy.server.certbot_path'),
'-n',
'--webroot',
'--webroot-path', config('tenancy.server.nginx.webroot'),
'--agree-tos',
'-d', $domain,
'--agree-tos',
'--preferred-challenges', 'http',
'--webroot-path', config('tenancy.server.nginx.webroot'),
], config('tenancy.server.nginx.extra_certbot_args')));
$process->run();