automatically start and pull config for yate #6

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

View file

@ -34,18 +34,14 @@
wantedBy = [ "default.target" ];
requiredBy = [ "network.target" ];
preStart = "echo \"\n\" >> /run/secrets/git_clone_key
if ! [ -d \"/var/lib/yate/.git\" ]
then
rm -rf /var/lib/yate/*
rm -rf /var/lib/yate/.*
${pkgs.git}/bin/git init /var/lib/yate
${pkgs.git}/bin/git -C /var/lib/yate remote add origin forgejo@git.hamburg.ccc.de:echtnurich/yate-config.git
env GIT_SSH_COMMAND=\"${pkgs.openssh}/bin/ssh -i /run/secrets/git_clone_key\" ${pkgs.git}/bin/git -C /var/lib/yate pull -f --set-upstream
${pkgs.git}/bin/git -C /var/lib/yate checkout --track -f origin/master
echo \"New repo set up.\"
fi
test ${pkgs.openssh}/bin/ssh
${pkgs.git}/bin/git -C /var/lib/yate config --add safe.directory \"/var/lib/yate\"
${pkgs.git}/bin/git -C /var/lib/yate remote add origin forgejo@git.hamburg.ccc.de:echtnurich/yate-config.git
env GIT_SSH_COMMAND=\"${pkgs.openssh}/bin/ssh -i /run/secrets/git_clone_key\" ${pkgs.git}/bin/git -C /var/lib/yate fetch --all
${pkgs.git}/bin/git -C /var/lib/yate checkout -f origin/master";
${pkgs.git}/bin/git -C /var/lib/yate checkout --track -f origin/master";
# ...
};
}