Use nix option for yate config reload #21

Manually merged
echtnurich merged 2 commits from fix-yate-reload into main 2025-02-04 19:07:38 +01:00
Owner

Turns out, systemd unit files just ignore multi-line scripts.
so we are switching to systemd.services..reload

This not only throws no errors, but should actually work.
The multi-line script will be put into a separate file and called as such.

This does not work

ExecReload= /nix/store/h2zihm0hb2n4ha5g96prrmgi71ixxvlr-git-2.47.1/bin/git config --global --add safe.directory /var/lib/yate /usr/bin/env GIT_SSH_COMMAND=\\"/nix/store/wi7sndvja4lf7lr0wz822cnq5dm575yv-openssh-9.9p1/bin/ssh -i /run/secrets/git_clone_key\\" /nix/store/h2zihm0hb2n4ha5g96prrmgi71ixxvlr-git-2.47.1/bin/git -C /var/lib/yate fetch --all /usr/bin/env GIT_SSH_COMMAND=\\"/nix/store/wi7sndvja4lf7lr0wz822cnq5dm575yv-openssh-9.9p1/bin/ssh -i /run/secrets/git_clone_key\\" /nix/store/h2zihm0hb2n4ha5g96prrmgi71ixxvlr-git-2.47.1/bin/git -C /var/lib/yate reset --hard origin/main

This at least works sometimes

ExecStartPre=/nix/store/7qkwspcgk08m1gr4r0wy9xvnqw2yfqph-unit-script-yate-pre-start/bin/yate-pre-start

Turns out, systemd unit files just ignore multi-line scripts. so we are switching to systemd.services.<name>.reload This not only throws no errors, but should actually work. The multi-line script will be put into a separate file and called as such. #### This does not work `ExecReload= /nix/store/h2zihm0hb2n4ha5g96prrmgi71ixxvlr-git-2.47.1/bin/git config --global --add safe.directory /var/lib/yate /usr/bin/env GIT_SSH_COMMAND=\\"/nix/store/wi7sndvja4lf7lr0wz822cnq5dm575yv-openssh-9.9p1/bin/ssh -i /run/secrets/git_clone_key\\" /nix/store/h2zihm0hb2n4ha5g96prrmgi71ixxvlr-git-2.47.1/bin/git -C /var/lib/yate fetch --all /usr/bin/env GIT_SSH_COMMAND=\\"/nix/store/wi7sndvja4lf7lr0wz822cnq5dm575yv-openssh-9.9p1/bin/ssh -i /run/secrets/git_clone_key\\" /nix/store/h2zihm0hb2n4ha5g96prrmgi71ixxvlr-git-2.47.1/bin/git -C /var/lib/yate reset --hard origin/main ` #### This at least works sometimes `ExecStartPre=/nix/store/7qkwspcgk08m1gr4r0wy9xvnqw2yfqph-unit-script-yate-pre-start/bin/yate-pre-start`
echtnurich self-assigned this 2025-01-24 18:05:11 +01:00
echtnurich added 1 commit 2025-01-24 18:05:11 +01:00
echtnurich added 1 commit 2025-01-24 19:12:50 +01:00
echtnurich added 1 commit 2025-01-24 19:54:35 +01:00
Author
Owner

From what I can tell, this works now as it is supposed to.

Config is pulled on rebuild switch and on unit reload

From what I can tell, this works now as it is supposed to. Config is pulled on rebuild switch and on unit reload
echtnurich changed title from WIP: Use nix option for yate config reload to Use nix option for yate config reload 2025-01-24 19:56:33 +01:00
echtnurich force-pushed fix-yate-reload from 6383cbb62f to 5cf9cffa77 2025-02-04 19:06:58 +01:00 Compare
echtnurich manually merged commit 5cf9cffa77 into main 2025-02-04 19:07:38 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: CCCHH/nix-infra#21
No description provided.