fix install script17
This commit is contained in:
parent
cddb7d97c1
commit
b26ec1d4d9
|
|
@ -427,11 +427,14 @@ EOF;
|
|||
private function createSystemdService() {
|
||||
$finalConfig = '/etc/zitirouter/zitirouter.yaml';
|
||||
|
||||
// Copy router config to final location
|
||||
if (!copy(ROUTER_CONFIG, $finalConfig)) {
|
||||
// Copy router config to final location using sudo
|
||||
if (!executeCommand("cp " . ROUTER_CONFIG . " '$finalConfig'")) {
|
||||
throw new Exception('Failed to copy router config to final location');
|
||||
}
|
||||
chmod($finalConfig, 0644);
|
||||
|
||||
if (!executeCommand("chmod 644 '$finalConfig'")) {
|
||||
throw new Exception('Failed to set final config permissions');
|
||||
}
|
||||
|
||||
$serviceContent = <<<EOF
|
||||
[Unit]
|
||||
|
|
|
|||
Loading…
Reference in New Issue