Skip to content

Commit

Permalink
Improve cron spec
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Oct 10, 2023
1 parent 88055a6 commit 40e83df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion specs/cronie.spec
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ install -pm 644 contrib/%{name}.systemd %{buildroot}%{_unitdir}/%{service_name}.
rm -rf %{buildroot}

%post
if [[ -f "%{_rundir}/%{service_name}.pid" ]] ; then
rm -f %{_rundir}/%{service_name}.pid
fi

if [[ $1 -eq 1 ]] ; then
systemctl enable %{service_name}.service &>/dev/null || :
fi
Expand All @@ -178,8 +182,10 @@ if [[ $1 -eq 0 ]]; then
fi

%postun
systemctl daemon-reload &>/dev/null || :

if [[ $1 -ge 1 ]] ; then
systemctl daemon-reload &>/dev/null || :
systemctl try-restart &>/dev/null || :
fi

%post anacron
Expand Down

0 comments on commit 40e83df

Please sign in to comment.