[Fix] Remove sock files when restarting services

This commit is contained in:
samuel 2023-04-15 16:55:05 +02:00
parent 75054cdaf2
commit 07a5e23697
1 changed files with 9 additions and 3 deletions

View File

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