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

avoid empty path

This commit is contained in:
OniriCorpe 2024-02-09 00:32:14 +01:00
parent 36161e9c2d
commit 51915956a1
3 changed files with 3 additions and 0 deletions

View file

@ -36,6 +36,7 @@ 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#/}
if [ "$url_path" == "" ]; then url_path="/"; fi
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

@ -42,6 +42,7 @@ 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#/}
if [ "$url_path" == "" ]; then url_path="/"; fi
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

@ -57,6 +57,7 @@ url_path=$(ynh_app_setting_get --app="$app" --key=url_path)
if [ -z "$url_path" ]; then
url_path=${path#/}
if [ "$url_path" == "" ]; then url_path="/"; fi
ynh_app_setting_set --app="$app" --key=url_path --value="$url_path"
fi