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