Now generates a random cron key during setup

merge-requests/108/head
Mike Hurley 2019-08-26 19:50:50 +00:00
parent 1b73aa872a
commit 775741eb91
1 changed files with 4 additions and 0 deletions

View File

@ -162,6 +162,10 @@ fi
#Create default configuration file #Create default configuration file
if [ ! -e "./conf.json" ]; then if [ ! -e "./conf.json" ]; then
cp conf.sample.json conf.json cp conf.sample.json conf.json
#Generate a random Cron key for the config file
cronKey=$(< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-30})
sed -i -e 's/change_this_to_something_very_random__just_anything_other_than_this/'"$cronKey"'/g' conf.json
fi fi
if [ ! -e "./super.json" ]; then if [ ! -e "./super.json" ]; then