Skip to content

Commit

Permalink
Fix for ubuntu systems
Browse files Browse the repository at this point in the history
  • Loading branch information
jomann09 committed Jan 18, 2024
1 parent 9702a60 commit fa50b80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/package/rcagent.spec
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ getent passwd rcagent >/dev/null || \
-c "rcagent user account for running plugins" rcagent

%post
if [ $1 -eq 1 ]
if [ "$1" == "1" ]
then
# Install sets up systemctl service so it only runs on install
%{_sbindir}/%{name} -a install &> /dev/null
@@ -63,15 +63,15 @@ fi

%preun
# On uninstall stop before removing
if [ $1 -eq 0 ]
if [ "$1" == "0" ]
then
systemctl stop %{name}.service &> /dev/null
%{_sbindir}/%{name} -a uninstall &> /dev/null
fi

%posttrans
# Restart the service if it needs to be restarted after upgrade
if [ $1 -eq 2 ]
if [ "$1" == "2" ]
then
if command -v systemctl > /dev/null
then

0 comments on commit fa50b80

Please sign in to comment.