fix shell script

This commit is contained in:
2026-08-24 16:08:19 -05:00
parent e6bae58591
commit 4133899358
+3 -1
View File
@@ -57,6 +57,8 @@
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
ExecStart = pkgs.writeShellScript "start-gitea" '' ExecStart = pkgs.writeShellScript "start-gitea" ''
set -euo pipefail
echo "Creating temp dir" echo "Creating temp dir"
kubernetes_config=$(mktemp -d) kubernetes_config=$(mktemp -d)
@@ -65,7 +67,7 @@
echo "${opts.database-hostname}" | $gomplate \ echo "${opts.database-hostname}" | $gomplate \
--input-dir=${k3sDir} \ --input-dir=${k3sDir} \
--output-dir=$kubernetes_config \ --output-dir=$kubernetes_config \
--datasource credentials=file://${opts.credentialsFile}?type=application/x-env --datasource credentials=file://${opts.credentialsFile}?type=application/x-env \
--datasource dbhostname=stdin: --datasource dbhostname=stdin:
echo "Applying k3s config" echo "Applying k3s config"