Exit on failed get-authkey
This commit is contained in:
@@ -87,6 +87,7 @@
|
|||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
RuntimeDirectory = name;
|
RuntimeDirectory = name;
|
||||||
ExecStartPre = "!${pkgs.writeShellScript "get-authkey" ''
|
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
|
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
|
chown ${name}:${name} $RUNTIME_DIRECTORY/authkey
|
||||||
''}";
|
''}";
|
||||||
|
|||||||
Reference in New Issue
Block a user