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

Update restore

This commit is contained in:
yalh76 2021-08-22 14:30:50 +02:00
parent fff2fd41b7
commit f7691177ed

View file

@ -142,6 +142,18 @@ systemctl enable $app-iframely.service --quiet
ynh_restore_file --origin_path="/etc/systemd/system/$app-pict-rs.service" ynh_restore_file --origin_path="/etc/systemd/system/$app-pict-rs.service"
systemctl enable $app-pict-rs.service --quiet systemctl enable $app-pict-rs.service --quiet
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..."
mkdir -p "/var/log/$app"
chmod 750 "/var/log/$app"
chmod -R o-rwx "/var/log/$app"
chown -R $app:$app "/var/log/$app"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
@ -162,18 +174,6 @@ ynh_systemd_action --service_name=$app-ui --action="start" --line_match="Started
ynh_systemd_action --service_name=$app-iframely --action="start" --line_match="Started" --log_path=systemd ynh_systemd_action --service_name=$app-iframely --action="start" --line_match="Started" --log_path=systemd
ynh_systemd_action --service_name=$app-pict-rs --action="start" --line_match="Started" --log_path=systemd ynh_systemd_action --service_name=$app-pict-rs --action="start" --line_match="Started" --log_path=systemd
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..."
mkdir -p "/var/log/$app"
chmod 750 "/var/log/$app"
chmod -R o-rwx "/var/log/$app"
chown -R $app:$app "/var/log/$app"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================