Add reload script for refreshing config during runtime

This commit is contained in:
echtnurich 2025-01-23 20:15:37 +01:00
parent 50e5e78968
commit aadf95b576
Signed by: echtnurich
SSH key fingerprint: SHA256:1eIkxME0VPeXC2WMl9Haus+q0SLFymSAWU7f6Z+A8Aw

View file

@ -45,6 +45,11 @@
};
serviceConfig = {
ExecStart = "${pkgs.yate}/bin/yate -c /etc/yate -e /etc/yate/share";
ExecReload= ''
${pkgs.git}/bin/git config --global --add safe.directory /var/lib/yate
/usr/bin/env GIT_SSH_COMMAND=\\"${pkgs.openssh}/bin/ssh -i /run/secrets/git_clone_key\\" ${pkgs.git}/bin/git -C /var/lib/yate fetch --all
/usr/bin/env GIT_SSH_COMMAND=\\"${pkgs.openssh}/bin/ssh -i /run/secrets/git_clone_key\\" ${pkgs.git}/bin/git -C /var/lib/yate reset --hard origin/main
'';
Type="simple";
Restart="always";
User="yate";