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

Move old settings file to datadir

downward compatibility
This commit is contained in:
ewilly 2023-09-18 20:10:21 +02:00
parent 64243f3984
commit 4aa0e02f37

View file

@ -17,13 +17,10 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [ ! -e "$data_dir/settings.yml" ]; then
secret_key=$(ynh_string_random)
ynh_add_config --template="../conf/settings.yml" --destination="$data_dir/settings.yml"
if [ -e "$install_dir/searx" ]; then
mv "$install_dir/searx/settings.yml" "$data_dir/settings.yml"
chmod 400 "$data_dir/settings.yml"
chown $app: "$data_dir"
fi
if [ -e "$install_dir/searx" ]; then
ynh_secure_remove --file="$install_dir"
ynh_delete_file_checksum --file="/opt/yunohost/$app/searx/settings.yml"
fi