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:
parent
2b0b52d181
commit
c6466a7d2b
4 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue