diff --git a/scripts/change_url b/scripts/change_url index cb9855e..e9bd587 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -108,7 +108,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=5 -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Server running at port" +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Server running at" #================================================= # RELOAD NGINX diff --git a/scripts/restore b/scripts/restore index 3ecc868..799696a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -90,15 +90,19 @@ systemctl enable "redis-$app.service" --quiet chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:redis "$final_path" +chown -R $app:$app "$final_path" #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 -ynh_restore_file --origin_path="/etc/logrotate.d/$app" +# recreate log directory in case of restoring backup in a new installation +mkdir --parents /var/log/$app +chown -R $app:$app "/var/log/$app/" + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= # INTEGRATE SERVICE IN YUNOHOST #=================================================