From 88f4abbf071ef962e2f0e0cd57ac302f7d0ce235 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Mon, 6 May 2019 19:31:34 +0200 Subject: [PATCH 1/4] Add change_url script --- check_process | 2 +- manifest.json | 2 +- scripts/change_url | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 scripts/change_url diff --git a/check_process b/check_process index 7527ae6..096d42c 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 1=auto Level 2=auto diff --git a/manifest.json b/manifest.json index a6e9c6b..05a0ee2 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,7 @@ "email": "apps@yunohost.org" }, "requirements": { - "yunohost": ">= 3.2.0" + "yunohost": ">= 3.5.0" }, "previous_maintainers": [{ "name": "mbugeia", diff --git a/scripts/change_url b/scripts/change_url new file mode 100644 index 0000000..14c221d --- /dev/null +++ b/scripts/change_url @@ -0,0 +1,92 @@ +#!/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 + +#================================================= +# 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 From 4d5f0cb80e3eb8879d29a3a60ce6476cfa595a55 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Wed, 8 May 2019 17:24:49 +0200 Subject: [PATCH 2/4] Change domain in Kanboard configuration --- scripts/change_url | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 14c221d..549d588 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -76,6 +76,16 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi +#================================================= +# SPECIFIC MODIFICATIONS +#================================================= +ynh_print_info "Applying Kanboard specific modifications..." + +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 #================================================= From 2e9551a0f59578d69adbcf4a2c3c2e089e29410b Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 8 May 2019 21:23:14 +0200 Subject: [PATCH 3/4] Use ynh_script_progression --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 549d588..cae08dd 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -79,7 +79,7 @@ fi #================================================= # SPECIFIC MODIFICATIONS #================================================= -ynh_print_info "Applying Kanboard specific modifications..." +ynh_script_progression --message="Applying Kanboard specific modifications..." --weight=2 if [ $change_domain -eq 1 ] then From fb7be44e4b1ba4b0c09089bb5cd57517427907ec Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Mon, 1 Jul 2019 21:31:28 +0200 Subject: [PATCH 4/4] Upgrade to upstream version 1.2.10 --- README.md | 2 +- conf/app.src | 4 ++-- conf/config.php | 1 + manifest.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) 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/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": {