[Fix] Remove sock files when restarting services
This commit is contained in:
parent
75054cdaf2
commit
07a5e23697
|
@ -52,11 +52,17 @@ if ! id %{name}-deployer; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Reload systemctl daemon and (re)start service.
|
# Reload systemctl daemon.
|
||||||
systemctl daemon-reload
|
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 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
|
systemctl enable %{name}-runner.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
|
Loading…
Reference in New Issue