automatically start and pull config for yate #6

Open
echtnurich wants to merge 11 commits from yate into main
Showing only changes of commit b4de5dbb53 - Show all commits

View file

@ -9,13 +9,20 @@
After="network.target"; After="network.target";
}; };
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.yate}/bin/yate -c /yate -e /yate/share -Do"; ExecStart = "${pkgs.yate}/bin/yate -c /etc/yate -e /etc/yate/share -Do";
Type="simple"; Type="simple";
Restart="always"; Restart="always";
# ... # ...
}; };
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
requiredBy = [ "network.target" ]; requiredBy = [ "network.target" ];
preStart = "if mkdir -p /etc/yate
then
${pkgs.git}/bin/git -C /etc/yate clone forgejo@git.hamburg.ccc.de:echtnurich/yate-config.git
${pkgs.git}/bin/git -C /etc/yate pull
else
${pkgs.git}/bin/git -C /etc/yate checkout -f origin/main
fi";
# ... # ...
}; };
} }