__netbox: fix detection of the secret-key to use
Mixed up a parameter. Should be correct now.
This commit is contained in:
parent
eed3515424
commit
3389752dec
1 changed files with 3 additions and 3 deletions
|
@ -47,13 +47,13 @@ export ALLOWED_HOSTS
|
|||
if [ -f "$__object/parameter/secret-key" ]; then
|
||||
SECRET_KEY=$(cat "$__object/parameter/secret-key")
|
||||
elif [ -s "$__object/explorer/secretkey" ]; then
|
||||
# take the key that is already used
|
||||
SECRET_KEY="$(cat "$__object/explorer/secretkey")"
|
||||
else
|
||||
# Can be done over netbox/generate_secret_key.py too, but it's to
|
||||
# complicated with the variable setup (can't generated right now!).
|
||||
# Generates a 50-character long key (without ' cause of python quotes)
|
||||
SECRET_KEY="$(tr -cd '[:graph:]' < /dev/random | tr -d \' | head -c50)"
|
||||
else
|
||||
# take the key that is already used
|
||||
SECRET_KEY="$(cat "$__object/explorer/secretkey")"
|
||||
fi
|
||||
export SECRET_KEY
|
||||
|
||||
|
|
Loading…
Reference in a new issue