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

Merge pull request #127 from YunoHost-Apps/convertv2

Convertv2
This commit is contained in:
Krakinou 2023-07-29 17:15:38 +02:00 committed by GitHub
commit 6de98d8b22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View file

@ -28,6 +28,11 @@ ynh_systemd_action --service_name=$app --action="stop"
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
#Cannot use empty string for X-script-name, causes an issue in the python prg
if [ $path_url = "/" ] ; then
ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf
fi
ynh_change_url_nginx_config
#=================================================

View file

@ -31,16 +31,12 @@ upgrade_type=$(ynh_check_app_version_changed)
current_upstream_package_version=$(ynh_app_upstream_version --manifest="/etc/yunohost/apps/$app/manifest.json") #0.96.0
current_upstream_package_version="${current_upstream_package_version/".96"/".6"}" #0.6.0
new_upstream_package_version=$(ynh_app_upstream_version) #0.96.0
new_upstream_package_version=$(ynh_app_upstream_version)
new_upstream_package_version="${new_upstream_package_version/".96"/".6"}" #0.6.0
#if [ -f $install_dir/cps/constants.py ]; then #on est dans une version postérieur à la 0.6.0
# current_upstream_app_version=$(cat $install_dir/cps/constants.py | grep STABLE_VERSION)
# current_upstream_app_version="${current_upstream_app_version/STABLE_VERSION = \{\'version\': \'/""}"
# current_upstream_app_version="${current_upstream_app_version/\'\}/""}"
#else #on est encore en 0.6.0
# current_upstream_app_version='0.6.0'
#fi
current_upstream_app_version=$(cat $install_dir/cps/constants.py | grep STABLE_VERSION)
current_upstream_app_version="${current_upstream_app_version/STABLE_VERSION = \{\'version\': \'/""}"
current_upstream_app_version="${current_upstream_app_version/\'\}/""}"
#=================================================