1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kavita_ynh.git synced 2024-09-03 19:26:30 +02:00

Revert "use standard path"

This reverts commit ebd9a747ce.
This commit is contained in:
OniriCorpe 2024-02-09 00:22:08 +01:00
parent f1e9d99101
commit 36161e9c2d
3 changed files with 13 additions and 0 deletions

View file

@ -33,6 +33,10 @@ ynh_change_url_nginx_config
ynh_backup_if_checksum_is_different --file="$install_dir/config/appsettings.json"
key=$(ynh_app_setting_get --app="$app" --key=key)
domain="$new_domain"
ynh_app_setting_set --app="$app" --key=domain --value="$domain"
url_path=${new_path#/}
ynh_app_setting_set --app="$app" --key=url_path --value="$url_path"
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"

View file

@ -41,6 +41,8 @@ ynh_script_progression --message="Modifying a config file..." --weight=1
key=$(ynh_string_random --length=70)
ynh_app_setting_set --app="$app" --key=key --value="$key"
url_path=${path#/}
ynh_app_setting_set --app="$app" --key=url_path --value="$url_path"
ynh_add_config --template="appsettings.json.example" --destination="$install_dir/config/appsettings.json"

View file

@ -53,6 +53,13 @@ then
ynh_app_setting_set --app="$app" --key=key --value="$key"
fi
url_path=$(ynh_app_setting_get --app="$app" --key=url_path)
if [ -z "$url_path" ]; then
url_path=${path#/}
ynh_app_setting_set --app="$app" --key=url_path --value="$url_path"
fi
ynh_add_config --template="appsettings.json.example" --destination="$install_dir/config/appsettings.json"
chmod 600 "$install_dir/config/appsettings.json"