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

Apply example_ynh

This commit is contained in:
yalh76 2020-05-27 03:32:28 +02:00
parent eb24e02418
commit 84be9cceb6
4 changed files with 13 additions and 6 deletions

View file

@ -32,18 +32,19 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
#=================================================
# STANDARD BACKUP STEPS
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_print_info --message="Backing up the main app directory..."
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_print_info --message="Backing up nginx web server configuration..."
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -52,7 +53,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_print_info --message="Backing up systemd configuration..."
ynh_backup --src_path="/etc/systemd/system/$app.service"

View file

@ -164,7 +164,7 @@ chown -R $app: $final_path
#=================================================
ynh_print_info --message="Integrating service in YunoHost..."
yunohost service add $app --description "$app daemon for Syncthing"
yunohost service add $app --description "$app daemon for Syncthing" --log_type "systemd"
#=================================================
# START SYSTEMD SERVICE

View file

@ -98,7 +98,7 @@ systemctl enable $app.service
#=================================================
ynh_print_info --message="Integrating service in YunoHost..."
yunohost service add $app --description "$app daemon for Syncthing"
yunohost service add $app --description "$app daemon for Syncthing" --log_type "systemd"
#=================================================
# START SYSTEMD SERVICE

View file

@ -167,6 +167,13 @@ ynh_print_info --message="Upgrading systemd configuration..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_print_info --message="Integrating service in YunoHost..."
yunohost service add $app --description "$app daemon for Syncthing" --log_type "systemd"
#=================================================
# GENERIC FINALIZATION
#=================================================