Skip to content

Commit 1eb6cc1

Browse files
author
ppom
committed
nixos/peertube: startup script: exec into nodejs
1. Removed the #!/bin/sh shebang at the beginning, because systemd.services.<name>.script already adds a #!/nix/store/.../bin/bash shebang. Previously: #!/nix/store/516kai7nl5dxr792c0nzq0jp8m4zvxpi-bash-5.2p32/bin/bash set -e #!/bin/sh umask 077 ... 2. Exec into nodejs, so that the startup script is no longer running but replaces itself by nodejs. This way, only one processus is running inside peertube.service.
1 parent 3f0954c commit 1eb6cc1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nixos/modules/services/web-apps/peertube.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ in {
432432
path = with pkgs; [ nodejs_18 yarn ffmpeg-headless openssl ];
433433

434434
script = ''
435-
#!/bin/sh
436435
umask 077
437436
cat > /var/lib/peertube/config/local.yaml <<EOF
438437
${lib.optionalString (cfg.secrets.secretsFile != null) ''
@@ -457,7 +456,7 @@ in {
457456
ln -sf ${cfg.package}/config/default.yaml /var/lib/peertube/config/default.yaml
458457
ln -sf ${cfg.package}/client/dist -T /var/lib/peertube/www/client
459458
ln -sf ${cfg.settings.storage.client_overrides} -T /var/lib/peertube/www/client-overrides
460-
node dist/server
459+
exec node dist/server
461460
'';
462461
serviceConfig = {
463462
Type = "simple";

0 commit comments

Comments
 (0)