mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
Generate secret_key on upgrade if it does not exist and store it
This commit is contained in:
parent
b0451fc730
commit
111912e8e1
1 changed files with 7 additions and 0 deletions
|
@ -68,6 +68,13 @@ if [ -z "$final_path" ]; then
|
|||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
fi
|
||||
|
||||
# If secret_key doesn't exist, create it
|
||||
if [[ -z "$secret_key" ]]; then
|
||||
secret_key=$(ynh_string_random --length=50)
|
||||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||
fi
|
||||
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
|
Loading…
Add table
Reference in a new issue