Merge pull request #82 from YunoHost-Apps/testing

Testing
This commit is contained in:
yalh76 2020-01-09 22:31:18 +01:00 committed by GitHub
commit 681cdce4cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 8 deletions

View File

@ -10,6 +10,7 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=62db8a96750dfd28880126d3eb9228d4d71f0814
backup_restore=1
multi_instance=1
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.

View File

@ -38,7 +38,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#=================================================
ynh_print_info --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped wikijs service"
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped wikijs service"
#=================================================
# BACKUP THE APP MAIN DIR
@ -75,7 +75,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
ynh_print_info --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server:"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="HTTP Server:"
#=================================================
# END OF SCRIPT

View File

@ -75,7 +75,7 @@ fi
#=================================================
ynh_print_info --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped wikijs service"
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped wikijs service"
#=================================================
# MODIFY URL IN NGINX CONF
@ -113,7 +113,7 @@ fi
#=================================================
ynh_print_info --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server:"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="HTTP Server:"
#=================================================
# RELOAD NGINX

View File

@ -169,7 +169,7 @@ yunohost service add $app --description "$app daemon for Wiki.js" --log_type sys
# START SYSTEMD SERVICE
#=================================================
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server:"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="HTTP Server:"
#=================================================
# SETUP SSOWAT

View File

@ -116,7 +116,7 @@ yunohost service add $app --description "$app daemon for Wiki.js" --log_type sys
#=================================================
ynh_print_info --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server:"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="HTTP Server:"
#=================================================
# CREATE LDAP USER

View File

@ -86,6 +86,10 @@ ynh_print_info --message="Backing up the app before upgrading (may take a while)
# Backup the current version of the app
ynh_backup_before_upgrade
#Workaround to be remove in next version
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="HTTP Server:"
ynh_clean_setup () {
# restore it if the upgrade fails
ynh_restore_upgradebackup
@ -101,7 +105,7 @@ ynh_abort_if_errors
#=================================================
ynh_print_info --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped wikijs service"
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped wikijs service"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -111,8 +115,16 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_print_info --message="Upgrading source files..."
config_file="$final_path/config.yml"
tmpdir="$(mktemp -d)"
rsync -a "$config_file" "$tmpdir/."
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
rsync -a "$tmpdir/config.yml" "$final_path/."
fi
#=================================================
@ -196,7 +208,7 @@ fi
#=================================================
ynh_print_info --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server:"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="HTTP Server:"
#=================================================
# RELOAD NGINX