recreate the full config everytime
This commit is contained in:
parent
149f846d32
commit
3b83a5d8ab
1 changed files with 5 additions and 9 deletions
|
@ -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";
|
||||
|
||||
# ...
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue