Add reload script for refreshing config during runtime
This commit is contained in:
parent
50e5e78968
commit
aadf95b576
1 changed files with 5 additions and 0 deletions
|
@ -45,6 +45,11 @@
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.yate}/bin/yate -c /etc/yate -e /etc/yate/share";
|
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";
|
Type="simple";
|
||||||
Restart="always";
|
Restart="always";
|
||||||
User="yate";
|
User="yate";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue