cdist-contrib/type/__netbox/explorer/secretkey
Matthias Stecher 49bb527dea __netbox: autogen secretkey and store at remote
The secret key is generated if it is not set via parameter and the
explorer does not return any. It will be saved in the netbox home
directory to easily read the key for the config generation.
2020-08-23 16:52:02 +02:00

8 lines
148 B
Bash
Executable file

#!/bin/sh -e
# Explorer will output the key if he exists.
secretkey="/opt/netbox/.secretkey"
if [ -f "$secretkey" ]; then
cat "$secretkey"
fi