diff --git a/README.md b/README.md index 734809b..2c0a68c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Kanboard is a simple visual task board web application. -**Shipped version:** 1.2.9 +**Shipped version:** 1.2.10 ## Screenshots diff --git a/check_process b/check_process index 5303e73..f50d9d5 100644 --- a/check_process +++ b/check_process @@ -17,7 +17,7 @@ multi_instance=1 incorrect_path=1 port_already_use=0 - change_url=0 + change_url=1 ;;; Levels Level 5=auto ;;; Upgrade options diff --git a/conf/app.src b/conf/app.src index 6926859..f544188 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/kanboard/kanboard/archive/v1.2.9.tar.gz -SOURCE_SUM=6d17ac8f047540e386db4d593b264cee909208ce09dd413e6d426dd53f9c5301 +SOURCE_URL=https://github.com/kanboard/kanboard/archive/v1.2.10.tar.gz +SOURCE_SUM=4368f0d5902a4831642103fdab90d2a61b6987ce77b046e637883168e4ad0bcb SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/config.php b/conf/config.php index 6b8b1e2..616cf56 100644 --- a/conf/config.php +++ b/conf/config.php @@ -227,6 +227,7 @@ define('HTTP_PROXY_HOSTNAME', ''); define('HTTP_PROXY_PORT', '3128'); define('HTTP_PROXY_USERNAME', ''); define('HTTP_PROXY_PASSWORD', ''); +define('HTTP_PROXY_EXCLUDE', 'localhost'); // Set to false to allow self-signed certificates define('HTTP_VERIFY_SSL_CERTIFICATE', false); diff --git a/manifest.json b/manifest.json index 8d9eccb..1d06b4b 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Kanboard is a simple visual task board web application" }, - "version": "1.2.9~ynh2", + "version": "1.2.10~ynh1", "url": "https://kanboard.net/", "license": "AGPL-3.0", "maintainer": { diff --git a/scripts/change_url b/scripts/change_url new file mode 100644 index 0000000..cae08dd --- /dev/null +++ b/scripts/change_url @@ -0,0 +1,102 @@ +#!/bin/bash + +#================================================= +# GENERIC STARTING +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# RETRIEVE ARGUMENTS +#================================================= + +old_domain=$YNH_APP_OLD_DOMAIN +old_path=$YNH_APP_OLD_PATH + +new_domain=$YNH_APP_NEW_DOMAIN +new_path=$YNH_APP_NEW_PATH + +app=$YNH_APP_INSTANCE_NAME + +#================================================= +# LOAD SETTINGS +#================================================= +ynh_script_progression --message="Loading installation settings..." + +# Needed for helper "ynh_add_nginx_config" +final_path=$(ynh_app_setting_get --app=$app --key=final_path) + +#================================================= +# CHECK WHICH PARTS SHOULD BE CHANGED +#================================================= + +change_domain=0 +if [ "$old_domain" != "$new_domain" ] +then + change_domain=1 +fi + +change_path=0 +if [ "$old_path" != "$new_path" ] +then + change_path=1 +fi + +#================================================= +# STANDARD MODIFICATIONS +#================================================= +# MODIFY URL IN NGINX CONF +#================================================= +ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 + +nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf + +# Change the path in the nginx config file +if [ $change_path -eq 1 ] +then + # Make a backup of the original nginx config file if modified + ynh_backup_if_checksum_is_different --file="$nginx_conf_path" + # Set global variables for nginx helper + domain="$old_domain" + path_url="$new_path" + # Create a dedicated nginx config + ynh_add_nginx_config +fi + +# Change the domain for nginx +if [ $change_domain -eq 1 ] +then + # Delete file checksum for the old conf file location + ynh_delete_file_checksum --file="$nginx_conf_path" + mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf + # Store file checksum for the new config file location + ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +fi + +#================================================= +# SPECIFIC MODIFICATIONS +#================================================= +ynh_script_progression --message="Applying Kanboard specific modifications..." --weight=2 + +if [ $change_domain -eq 1 ] +then + # Change domain in Kanboard configuration + ynh_replace_string --match_string="'${old_domain}'" --replace_string="'${new_domain}'" --target_file="${final_path}/config.php" +fi +#================================================= +# GENERIC FINALISATION +#================================================= +# RELOAD NGINX +#================================================= +ynh_script_progression --message="Reloading nginx web server..." + +ynh_systemd_action --service_name=nginx --action=reload + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Change of URL completed for $app" --last