Exit on failed get-authkey

This commit is contained in:
bluepython508
2024-09-28 11:14:52 +01:00
parent 8e62a22071
commit 033ac0b400

View File

@@ -87,6 +87,7 @@
DynamicUser = true;
RuntimeDirectory = name;
ExecStartPre = "!${pkgs.writeShellScript "get-authkey" ''
set -e
TS_API_CLIENT_ID=${cfg.clientId} TS_API_CLIENT_SECRET=$(cat ${cfg.clientSecretFile}) ${get-authkey}/bin/get-authkey -ephemeral -tags ${lib.concatStringsSep "," cfg.tags} > $RUNTIME_DIRECTORY/authkey
chown ${name}:${name} $RUNTIME_DIRECTORY/authkey
''}";