1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/haste_ynh.git synced 2024-09-03 20:36:28 +02:00

Update restore

This commit is contained in:
ericgaspar 2020-09-06 20:58:26 +02:00
parent 6c4a5a3770
commit 832c9716d6
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -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