Skip to content

Commit

Permalink
Attempt to hide secrets from the curl process listing
Browse files Browse the repository at this point in the history
  • Loading branch information
notthebee committed Oct 26, 2024
1 parent cae5068 commit 01d5adc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/misc/duckdns.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ in
{
options.services.duckdns = {
enable = lib.mkEnableOption ("DuckDNS Dynamic DNS Client");

tokenFile = lib.mkOption {
default = null;
type = lib.types.path;
Expand All @@ -37,6 +36,7 @@ in
The path to a file containing a
newline-separated list of DuckDNS
domain(s) to be updated
(without the .duckdns.org prefix)
'';
};

Expand Down Expand Up @@ -76,7 +76,7 @@ in
${lib.optionalString (cfg.domainsFile != null) ''
export DUCKDNS_DOMAINS=$(systemd-creds cat DUCKDNS_DOMAINS_FILE | sed -z 's/\n/,/g')
''}
curl --no-progress-meter -k "https://www.duckdns.org/update?domains=$DUCKDNS_DOMAINS&token=$DUCKDNS_TOKEN&ip=" | grep -v "KO"
curl --no-progress-meter -k -K- <<< "url = 'https://www.duckdns.org/update?domains=$DUCKDNS_DOMAINS&token=$DUCKDNS_TOKEN&ip='" | grep -v "KO"
'';
};
};
Expand Down

0 comments on commit 01d5adc

Please sign in to comment.