mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
commit
99d57b8b31
6 changed files with 108 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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": {
|
||||
|
|
102
scripts/change_url
Normal file
102
scripts/change_url
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue