diff --git a/scripts/restore b/scripts/restore index 2f880fb..f643cc6 100755 --- a/scripts/restore +++ b/scripts/restore @@ -61,7 +61,7 @@ ynh_restore_file --origin_path="$final_path" ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # SPECIFIC RESTORE @@ -71,14 +71,6 @@ ynh_system_user_create --username=$app ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=2 - -ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -systemctl enable $app.service - #================================================= # RESTORE VARIOUS FILES #================================================= @@ -106,12 +98,20 @@ chmod +x /usr/bin/$app yunohost service add $app --description "Haste is an open-source pastebin software" --log "/var/log/$app/$app.log" +#================================================= +# RESTORE SYSTEMD +#================================================= +ynh_script_progression --message="Restoring the systemd configuration..." --weight=2 + +ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +systemctl enable $app.service + #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="haste@0.1.0 start" +ynh_systemd_action --service_name=$app --action="start" #--log_path="/var/log/$app/$app.log" #================================================= # RESTORE THE LOGROTATE CONFIGURATION