nixpkgs/pkgs/applications/video/mirakurun/nix-filesystem.patch
2021-09-07 12:22:59 +09:00

47 lines
1.9 KiB
Diff

diff --git a/processes.json b/processes.json
index b54d404..a40dfab 100644
--- a/processes.json
+++ b/processes.json
@@ -4,10 +4,10 @@
"name": "mirakurun-server",
"script": "lib/server.js",
"node_args" : "-r source-map-support/register",
- "error_file": "/usr/local/var/log/mirakurun.stderr.log",
- "out_file": "/usr/local/var/log/mirakurun.stdout.log",
+ "error_file": "/var/log/mirakurun.stderr.log",
+ "out_file": "/var/log/mirakurun.stdout.log",
"merge_logs": true,
- "pid_file": "/usr/local/var/run/mirakurun.pid",
+ "pid_file": "/var/run/mirakurun.pid",
"exec_mode": "fork",
"autorestart": true,
"env": {
diff --git a/src/Mirakurun/config.ts b/src/Mirakurun/config.ts
index 0b8a1a2..ff02fda 100644
--- a/src/Mirakurun/config.ts
+++ b/src/Mirakurun/config.ts
@@ -146,6 +146,7 @@ export function loadServer(): Server {
fs.copyFileSync("config/server.win32.yml", path);
} else {
fs.copyFileSync("config/server.yml", path);
+ fs.chmodSync(path, 0o644);
}
} catch (e) {
log.fatal("failed to copy server config to `%s`", path);
@@ -300,6 +301,7 @@ export function loadTuners(): Tuner[] {
fs.copyFileSync("config/tuners.win32.yml", path);
} else {
fs.copyFileSync("config/tuners.yml", path);
+ fs.chmodSync(path, 0o644);
}
} catch (e) {
log.fatal("failed to copy tuners config to `%s`", path);
@@ -342,6 +344,7 @@ export function loadChannels(): Channel[] {
fs.copyFileSync("config/channels.win32.yml", path);
} else {
fs.copyFileSync("config/channels.yml", path);
+ fs.chmodSync(path, 0o644);
}
} catch (e) {
log.fatal("failed to copy channels config to `%s`", path);