mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
parent
b9b120c607
commit
79c78d68c6
@ -36,17 +36,15 @@ let
|
|||||||
# be careful not to leak secrets in the filesystem or in process listings
|
# be careful not to leak secrets in the filesystem or in process listings
|
||||||
umask 0077
|
umask 0077
|
||||||
|
|
||||||
# get the api key by parsing the config.xml
|
|
||||||
while
|
|
||||||
! ${pkgs.libxml2}/bin/xmllint \
|
|
||||||
--xpath 'string(configuration/gui/apikey)' \
|
|
||||||
${cfg.configDir}/config.xml \
|
|
||||||
>"$RUNTIME_DIRECTORY/api_key"
|
|
||||||
do sleep 1; done
|
|
||||||
|
|
||||||
(printf "X-API-Key: "; cat "$RUNTIME_DIRECTORY/api_key") >"$RUNTIME_DIRECTORY/headers"
|
|
||||||
|
|
||||||
curl() {
|
curl() {
|
||||||
|
# get the api key by parsing the config.xml
|
||||||
|
while
|
||||||
|
! ${pkgs.libxml2}/bin/xmllint \
|
||||||
|
--xpath 'string(configuration/gui/apikey)' \
|
||||||
|
${cfg.configDir}/config.xml \
|
||||||
|
>"$RUNTIME_DIRECTORY/api_key"
|
||||||
|
do sleep 1; done
|
||||||
|
(printf "X-API-Key: "; cat "$RUNTIME_DIRECTORY/api_key") >"$RUNTIME_DIRECTORY/headers"
|
||||||
${pkgs.curl}/bin/curl -sSLk -H "@$RUNTIME_DIRECTORY/headers" \
|
${pkgs.curl}/bin/curl -sSLk -H "@$RUNTIME_DIRECTORY/headers" \
|
||||||
--retry 1000 --retry-delay 1 --retry-all-errors \
|
--retry 1000 --retry-delay 1 --retry-all-errors \
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -117,17 +117,17 @@ let
|
|||||||
|
|
||||||
export RUNTIME_DIRECTORY=/tmp
|
export RUNTIME_DIRECTORY=/tmp
|
||||||
|
|
||||||
# get the api key by parsing the config.xml
|
|
||||||
while
|
|
||||||
! ${pkgs.libxml2}/bin/xmllint \
|
|
||||||
--xpath 'string(configuration/gui/apikey)' \
|
|
||||||
${configPath} \
|
|
||||||
>"$RUNTIME_DIRECTORY/api_key"
|
|
||||||
do sleep 1; done
|
|
||||||
|
|
||||||
(printf "X-API-Key: "; cat "$RUNTIME_DIRECTORY/api_key") >"$RUNTIME_DIRECTORY/headers"
|
|
||||||
|
|
||||||
curl() {
|
curl() {
|
||||||
|
# get the api key by parsing the config.xml
|
||||||
|
while
|
||||||
|
! ${pkgs.libxml2}/bin/xmllint \
|
||||||
|
--xpath 'string(configuration/gui/apikey)' \
|
||||||
|
${configPath} \
|
||||||
|
>"$RUNTIME_DIRECTORY/api_key"
|
||||||
|
do sleep 1; done
|
||||||
|
|
||||||
|
(printf "X-API-Key: "; cat "$RUNTIME_DIRECTORY/api_key") >"$RUNTIME_DIRECTORY/headers"
|
||||||
|
|
||||||
${pkgs.curl}/bin/curl -sSLk -H "@$RUNTIME_DIRECTORY/headers" \
|
${pkgs.curl}/bin/curl -sSLk -H "@$RUNTIME_DIRECTORY/headers" \
|
||||||
--retry 1000 --retry-delay 1 --retry-all-errors \
|
--retry 1000 --retry-delay 1 --retry-all-errors \
|
||||||
"$@"
|
"$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user