automatically start and pull config for yate #6
|
@ -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";
|
||||||
# ...
|
# ...
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue