From 07a5e23697d06250160faf3fa98a55b0f0030441 Mon Sep 17 00:00:00 2001 From: samuel Date: Sat, 15 Apr 2023 16:55:05 +0200 Subject: [PATCH] [Fix] Remove sock files when restarting services --- netoik-cicd.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/netoik-cicd.spec b/netoik-cicd.spec index d8beede..dace3b2 100644 --- a/netoik-cicd.spec +++ b/netoik-cicd.spec @@ -52,11 +52,17 @@ if ! id %{name}-deployer; then fi %post -# Reload systemctl daemon and (re)start service. +# Reload systemctl daemon. systemctl daemon-reload -systemctl restart %{name}-deployer.service +# Restart deployer service. +systemctl stop %{name}-deployer.service +rm --force %{_rundir}/%{name}/deployer/deployer.sock +systemctl start %{name}-deployer.service systemctl enable %{name}-deployer.service -systemctl restart %{name}-runner.service +# Restart runner service. +systemctl stop %{name}-runner.service +rm --force %{_rundir}/%{name}/runner/runner.sock +systemctl start %{name}-runner.service systemctl enable %{name}-runner.service %preun