1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 18:44:04 +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 public function addVhost(string $domain, string $file): bool
{ {
$f = fopen($file, 'a'); $f = fopen($file, 'a');
fwrite($f, $this->getVhostText($domain)); $fw = fwrite($f, $this->getVhostText($domain));
fclose($f); $fc = fclose($f);
return true; return $fw && $fc;
} }
public function getVhostText(string $domain) public function getVhostText(string $domain)
@ -26,10 +26,10 @@ class NginxConfigManager implements ServerConfigManager
config('tenancy.server.certbot_path'), config('tenancy.server.certbot_path'),
'-n', '-n',
'--webroot', '--webroot',
'--webroot-path', config('tenancy.server.nginx.webroot'),
'--agree-tos',
'-d', $domain, '-d', $domain,
'--agree-tos',
'--preferred-challenges', 'http', '--preferred-challenges', 'http',
'--webroot-path', config('tenancy.server.nginx.webroot'),
], config('tenancy.server.nginx.extra_certbot_args'))); ], config('tenancy.server.nginx.extra_certbot_args')));
$process->run(); $process->run();