1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/distbin_ynh.git synced 2024-09-03 18:26:10 +02:00
This commit is contained in:
Éric Gaspar 2023-08-15 13:46:33 +02:00
parent 0d0b328524
commit b335139ef9
4 changed files with 0 additions and 153 deletions

View file

@ -1,45 +0,0 @@
;; Test complet
; Manifest
domain="domain.tld"
path="/path"
is_public=1
; Checks
pkg_linter=1
setup_sub_dir=1
setup_root=1
setup_nourl=0
setup_private=1
setup_public=1
upgrade=1
# 1.2.0~ynh3
#upgrade=1 from_commit=b01da8e6f8d621a1b9c7aec4b82bbe96c0e7cc03
# 1.3.0~ynh4
#upgrade=1 from_commit=0dda384e84bbe2513cb67cfd1eef15d667e50354
# 1.3.0~ynh5
#upgrade=1 from_commit=f7bc083d037eb771afeddc2237a24505a5ef1c68
# 1.3.0~ynh6
#upgrade=1 from_commit=cdec64125b179f6b19470ceb8379225ed03c10a8
# 1.3.0~ynh7
#upgrade=1 from_commit=481c0c5ce62caa9c79a6bd536f390f3814128b3a
# 1.3.0~ynh8
upgrade=1 from_commit=e53a85de775501b13d8ef9c546d6b523c0a99e4f
backup_restore=1
multi_instance=1
port_already_use=0
change_url=1
;;; Options
Email=yalh@yahoo.com
Notification=all
;;; Upgrade options
; commit=b01da8e6f8d621a1b9c7aec4b82bbe96c0e7cc03
name=1.2.0~ynh3
; commit=0dda384e84bbe2513cb67cfd1eef15d667e50354
name=1.3.0~ynh4
; commit=f7bc083d037eb771afeddc2237a24505a5ef1c68
name=1.3.0~ynh5
; commit=cdec64125b179f6b19470ceb8379225ed03c10a8
name=1.3.0~ynh6
; commit=481c0c5ce62caa9c79a6bd536f390f3814128b3a
name=1.3.0~ynh7
; commit=e53a85de775501b13d8ef9c546d6b523c0a99e4f
name=1.3.0~ynh8

View file

@ -1 +0,0 @@
* No configuration parameters available for now.

View file

@ -10,27 +10,6 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
#REMOVEME? ynh_clean_setup () {
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
#REMOVEME? ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
#REMOVEME? ynh_print_info --message="Loading installation settings..."
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================

View file

@ -9,61 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# RETRIEVE ARGUMENTS
#=================================================
#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN
#REMOVEME? old_path=$YNH_APP_OLD_PATH
#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN
#REMOVEME? new_path=$YNH_APP_NEW_PATH
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
#=================================================
# LOAD SETTINGS
#=================================================
#REMOVEME? ynh_script_progression --message="Loading installation settings..."
#REMOVEME? # Needed for helper "ynh_add_nginx_config"
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#=================================================
#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..."
# Backup the current version of the app
#REMOVEME? ynh_backup_before_upgrade
#REMOVEME? ynh_clean_setup () {
#REMOVEME? ynh_clean_check_starting
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
# Restore it if the upgrade fails
#REMOVEME? ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
#REMOVEME? ynh_abort_if_errors
#=================================================
# CHECK WHICH PARTS SHOULD BE CHANGED
#=================================================
#REMOVEME? change_domain=0
#REMOVEME? if [ "$old_domain" != "$new_domain" ]
then
#REMOVEME? change_domain=1
fi
#REMOVEME? change_path=0
#REMOVEME? if [ "$old_path" != "$new_path" ]
then
#REMOVEME? change_path=1
fi
#=================================================
# STANDARD MODIFICATIONS
#=================================================
@ -80,30 +25,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..."
ynh_change_url_nginx_config
#REMOVEME? 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
#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
# Set global variables for NGINX helper
#REMOVEME? domain="$old_domain"
#REMOVEME? path="$new_path"
# Create a dedicated NGINX config
#REMOVEME? 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
#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path"
#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
# Store file checksum for the new config file location
#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
@ -147,13 +68,6 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
sleep 60
fi
#=================================================
# RELOAD NGINX
#=================================================
#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..."
#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================