try binding to wait for identity service to complete

and see if remainafterexit fixes one of the issues
This commit is contained in:
Noah Masur 2024-03-30 13:01:34 -04:00
parent 1b7e4687e4
commit 0618fc3962
2 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,10 @@
systemd.services.wait-for-identity = { systemd.services.wait-for-identity = {
description = "Wait until identity file exists on the machine"; description = "Wait until identity file exists on the machine";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { Type = "oneshot"; }; serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
script = '' script = ''
for i in $(seq 1 10); do for i in $(seq 1 10); do
if [ -f ${config.identityFile} ]; then if [ -f ${config.identityFile} ]; then

View File

@ -68,7 +68,8 @@
description = "Decrypt secret for ${name}"; description = "Decrypt secret for ${name}";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = [ "wait-for-identity.service" ]; bindsTo = [ "wait-for-identity.service" ];
after = [ "wait-for-identity.service" ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
script = '' script = ''
echo "${attrs.prefix}$( echo "${attrs.prefix}$(