1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/syncthing_ynh.git synced 2024-09-03 20:26:23 +02:00

implement ynh_clean_check_starting

This commit is contained in:
yalh76 2019-04-14 21:29:47 +02:00
parent 2b0b52d181
commit c6466a7d2b
4 changed files with 8 additions and 4 deletions

View file

@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_clean_setup () {
true
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors

View file

@ -13,6 +13,9 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup () {
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
@ -112,6 +115,7 @@ ynh_add_systemd_config
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_print_info "Modifying a config file..."
mkdir -p "$final_path/.config/syncthing"
config_file="$final_path/.config/syncthing/config.xml"
@ -162,8 +166,7 @@ systemctl reload nginx
#=================================================
ynh_print_info "Starting Syncthing services..."
ynh_systemd_action --action=start --service_name=$app --log_path=systemd
#--line_match="Started $app"
ynh_systemd_action --action=start --service_name=$app --log_path=systemd --line_match="Access the GUI via the following URL"
#=================================================
# END OF SCRIPT

View file

@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_clean_setup () {
true
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors

View file

@ -33,6 +33,7 @@ ynh_print_info "Backing up the app before upgrading (may take a while)..."
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
ynh_clean_check_starting
# restore it if the upgrade fails
ynh_restore_upgradebackup
}