mirror of
https://github.com/YunoHost-Apps/kavita_ynh.git
synced 2024-09-03 19:26:30 +02:00
parent
f1e9d99101
commit
36161e9c2d
3 changed files with 13 additions and 0 deletions
|
@ -33,6 +33,10 @@ ynh_change_url_nginx_config
|
||||||
ynh_backup_if_checksum_is_different --file="$install_dir/config/appsettings.json"
|
ynh_backup_if_checksum_is_different --file="$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
key=$(ynh_app_setting_get --app="$app" --key=key)
|
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"
|
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||||
|
|
||||||
key=$(ynh_string_random --length=70)
|
key=$(ynh_string_random --length=70)
|
||||||
ynh_app_setting_set --app="$app" --key=key --value="$key"
|
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"
|
ynh_add_config --template="appsettings.json.example" --destination="$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,13 @@ then
|
||||||
ynh_app_setting_set --app="$app" --key=key --value="$key"
|
ynh_app_setting_set --app="$app" --key=key --value="$key"
|
||||||
fi
|
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"
|
ynh_add_config --template="appsettings.json.example" --destination="$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
chmod 600 "$install_dir/config/appsettings.json"
|
chmod 600 "$install_dir/config/appsettings.json"
|
||||||
|
|
Loading…
Add table
Reference in a new issue