mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-18 06:01:12 +00:00
Use rails secret to generate the secret key
This commit is contained in:
parent
d7765bf4fd
commit
c592a19f2d
1 changed files with 2 additions and 1 deletions
|
|
@ -12,8 +12,9 @@ fi
|
|||
SECRET_KEY_FILE="$DATA_DIR/secret_key"
|
||||
|
||||
if [ ! -f "$SECRET_KEY_FILE" ]; then
|
||||
echo ">>> Creating a new secret key file..."
|
||||
install -m 0600 /dev/null "$SECRET_KEY_FILE"
|
||||
SECRET_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 100 | head -n 1)
|
||||
SECRET_KEY=$(bundle exec rails secret)
|
||||
echo "$key" > "$SECRET_KEY_FILE"
|
||||
chmod -w "$SECRET_KEY_FILE"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue