Skip to content

Commit

Permalink
create random encryption key for credentials stored in node-red (impl…
Browse files Browse the repository at this point in the history
…ements #39)
  • Loading branch information
hobbyquaker committed Jul 27, 2018
1 parent 8e1d6d6 commit 6315350
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions addon_files/update_script
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ if [ ! -f $RED_DIR/etc/settings.json ]; then
mv $RED_DIR/etc/default-settings.json $RED_DIR/etc/settings.json
fi

#
# Create credentials encryption key
#
if [ ! -f $RED_DIR/etc/credentials.key ]; then
tr -dc '[:alnum:]' < /dev/urandom | dd bs=4 count=8 2>/dev/null > $RED_DIR/etc/credentials.key
fi

#
# Create example flows on first install
#
Expand Down

0 comments on commit 6315350

Please sign in to comment.