forked from Git/send_ynh
		
	Apply last example_ynh
This commit is contained in:
		@@ -6,6 +6,7 @@
 | 
			
		||||
# IMPORT GENERIC HELPERS
 | 
			
		||||
#=================================================
 | 
			
		||||
 | 
			
		||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
 | 
			
		||||
source ../settings/scripts/_common.sh
 | 
			
		||||
source /usr/share/yunohost/helpers
 | 
			
		||||
 | 
			
		||||
@@ -40,13 +41,6 @@ test ! -d $final_path \
 | 
			
		||||
 | 
			
		||||
#=================================================
 | 
			
		||||
# STANDARD RESTORATION STEPS
 | 
			
		||||
#=================================================
 | 
			
		||||
# RESTORE THE NGINX CONFIGURATION
 | 
			
		||||
#=================================================
 | 
			
		||||
ynh_script_progression --message="Restoring the NGINX configuration..."
 | 
			
		||||
 | 
			
		||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
 | 
			
		||||
 | 
			
		||||
#=================================================
 | 
			
		||||
# RECREATE THE DEDICATED USER
 | 
			
		||||
#=================================================
 | 
			
		||||
@@ -74,9 +68,17 @@ chmod +x "$final_path/server/bin/prod.js"
 | 
			
		||||
#=================================================
 | 
			
		||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
 | 
			
		||||
 | 
			
		||||
# Install Nodejs
 | 
			
		||||
# Define and install dependencies
 | 
			
		||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
 | 
			
		||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
 | 
			
		||||
 | 
			
		||||
#=================================================
 | 
			
		||||
# RESTORE THE NGINX CONFIGURATION
 | 
			
		||||
#=================================================
 | 
			
		||||
ynh_script_progression --message="Restoring the NGINX configuration..."
 | 
			
		||||
 | 
			
		||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
 | 
			
		||||
 | 
			
		||||
#=================================================
 | 
			
		||||
# RESTORE SYSTEMD
 | 
			
		||||
#=================================================
 | 
			
		||||
@@ -104,7 +106,7 @@ yunohost service add $app --description="Simple, private file sharing" --log="/v
 | 
			
		||||
#=================================================
 | 
			
		||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
 | 
			
		||||
 | 
			
		||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
 | 
			
		||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started"
 | 
			
		||||
 | 
			
		||||
#=================================================
 | 
			
		||||
# GENERIC FINALIZATION
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user