diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2021-05-29 22:13:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 22:13:03 +0200 |
commit | ee8cf6a6642eeffa69605ff9552ab321a4d87538 (patch) | |
tree | 4ea72fe8af381928c54aae31c8e5a6ea8fa8e684 /nixos | |
parent | 48b90a4edc4ce4eace45e0a5657b423086df631d (diff) | |
parent | 724ed08df02546fea2ab38613d615dd47461528c (diff) |
Merge pull request #124839 from mweinelt/wordpress/secret-key-regen
nixos/wordpress: regenerate secret keys if misspelled key name is found
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-apps/wordpress.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/wordpress.nix b/nixos/modules/services/web-apps/wordpress.nix index f251cfe32db64..775ecb3acaf0d 100644 --- a/nixos/modules/services/web-apps/wordpress.nix +++ b/nixos/modules/services/web-apps/wordpress.nix @@ -61,8 +61,10 @@ let ?> ''; - secretsVars = [ "AUTH_KEY" "SECURE_AUTH_KEY" "LOOGGED_IN_KEY" "NONCE_KEY" "AUTH_SALT" "SECURE_AUTH_SALT" "LOGGED_IN_SALT" "NONCE_SALT" ]; + secretsVars = [ "AUTH_KEY" "SECURE_AUTH_KEY" "LOGGED_IN_KEY" "NONCE_KEY" "AUTH_SALT" "SECURE_AUTH_SALT" "LOGGED_IN_SALT" "NONCE_SALT" ]; secretsScript = hostStateDir: '' + # The match in this line is not a typo, see https://github.com/NixOS/nixpkgs/pull/124839 + grep -q "LOOGGED_IN_KEY" "${hostStateDir}/secret-keys.php" && rm "${hostStateDir}/secret-keys.php" if ! test -e "${hostStateDir}/secret-keys.php"; then umask 0177 echo "<?php" >> "${hostStateDir}/secret-keys.php" |