sp-modules: use jq exit status code

pull/55/head
Alexander Tomokhov 2023-12-03 10:37:37 +04:00
parent 4716b9bf19
commit ade4dc08b1
3 changed files with 7 additions and 6 deletions

View File

@ -30,11 +30,11 @@
path = with pkgs; [ coreutils jq ];
script = ''
install -m 0440 -o nextcloud -g nextcloud -DT \
<(jq < ${secrets-filepath} -r '.modules.nextcloud.databasePassword') \
<(jq -re '.modules.nextcloud.databasePassword' ${secrets-filepath}) \
${db-pass-filepath}
install -m 0440 -o nextcloud -g nextcloud -DT \
<(jq < ${secrets-filepath} -r '.modules.nextcloud.adminPassword') \
<(jq -re '.modules.nextcloud.adminPassword' ${secrets-filepath}) \
${admin-pass-filepath}
'';
};

View File

@ -61,7 +61,8 @@ in
path = with pkgs; [ coreutils jq ];
script = ''
set -o nounset
password=$(jq -r '.databasePassword' ${secrets-filepath})
password="$(jq -re '.databasePassword' ${secrets-filepath})"
filecontents=$(cat <<- EOF
import Config
config :pleroma, Pleroma.Repo,

View File

@ -52,8 +52,8 @@ in
script = ''
set -o nounset
account="$(jq -r '.modules.restic.accountId' ${secrets-filepath})"
key="$(jq -r '.modules.restic.accountKey' ${secrets-filepath})"
account="$(jq -re '.modules.restic.accountId' ${secrets-filepath})"
key="$(jq -re '.modules.restic.accountKey' ${secrets-filepath})"
rclone_conf=$(cat <<- EOF
[backblaze]
account = $account
@ -64,7 +64,7 @@ in
<(printf "%s" "$rclone_conf") ${rclone-conf-filepath}
install -m 0400 -o restic -g restic -DT \
<(jq -r '.resticPassword' ${secrets-filepath}) /var/lib/restic/pass
<(jq -re '.resticPassword' ${secrets-filepath}) /var/lib/restic/pass
'';
};
};