mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
parent
95eb3d761f
commit
7d701f855f
2 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ ynh_handle_app_migration () {
|
|||
ynh_handle_getopts_args "$@"
|
||||
|
||||
# Get the new app id in the manifest
|
||||
local new_app_id=$(grep \"id\": ../manifest.toml| cut -d\" -f4)
|
||||
local new_app_id=$(grep \"id\": ../manifest.json | cut -d\" -f4)
|
||||
if [ $old_app_number -eq 1 ]; then
|
||||
local new_app=$new_app_id
|
||||
else
|
||||
|
@ -129,7 +129,7 @@ ynh_handle_app_migration () {
|
|||
|
||||
local settings_dir="/etc/yunohost/apps"
|
||||
cp -a "$settings_dir/$old_app" "$settings_dir/$new_app"
|
||||
cp -a ../{scripts,conf,manifest.json} "$settings_dir/$new_app/{scripts,conf,manifest.toml}"
|
||||
cp -a ../{scripts,conf,manifest.json} "$settings_dir/$new_app"
|
||||
|
||||
# Replace the old id by the new one
|
||||
ynh_replace_string --match_string="\(^id: .*\)$old_app" --replace_string="\1$new_app" --target_file="$settings_dir/$new_app/settings.yml"
|
||||
|
|
|
@ -47,7 +47,7 @@ ynh_clean_setup () {
|
|||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
# If secret_key doesn't exist, create it
|
||||
if [[ -z "${secret_key:-}" ]]; then
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue