Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Jul 16, 2024
1 parent 1f8d851 commit eb00eec
Showing 1 changed file with 27 additions and 30 deletions.
57 changes: 27 additions & 30 deletions .github/workflows/packaging/rpm/spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Requires: inotify-tools
Requires: virt-what
Requires: net-tools
Requires: bind-utils
# Requires: python3-tabulate
# Requires: python3-colorama
# Requires: python3-dateutil
# Requires: python3-yaml
# Requires: python3-dateutil
# Requires: python3-simplejson
# Requires: python3-distro
Requires: python3-tabulate
Requires: python3-colorama
Requires: python3-dateutil
Requires: python3-yaml
Requires: python3-dateutil
Requires: python3-simplejson
Requires: python3-distro

%description
Linupdate 3 (python version) - Packages updater and Repomanager client side agent
Expand All @@ -30,13 +30,12 @@ if [ -f "/etc/linupdate/linupdate.yml" ];then
fi

# Only if systemd is installed (not the case on github runners)
# TODO: service is not working for now
# if [ -f "/usr/bin/systemctl" ];then
# # Stop service if started
# if /usr/bin/systemctl is-active --quiet linupdate;then
# /usr/bin/systemctl stop --quiet linupdate
# fi
# fi
if [ -f "/usr/bin/systemctl" ];then
# Stop service if started
if /usr/bin/systemctl is-active --quiet linupdate;then
/usr/bin/systemctl stop --quiet linupdate
fi
fi

%install
# Copy local files to the rpm build directory
Expand Down Expand Up @@ -65,27 +64,25 @@ chmod 750 /etc/linupdate
chmod 750 /opt/linupdate

# Only if systemd is installed (not the case on github runners)
# TODO: service is not working for now
# if [ -f "/usr/bin/systemctl" ];then
# # Enable service script by creating a symlink
# ln -sf /lib/systemd/system/linupdate.service /etc/systemd/system/linupdate.service
# chmod 550 "$SERVICE"
# chown root:root "$SERVICE"
if [ -f "/usr/bin/systemctl" ];then
# Enable service script by creating a symlink
ln -sf /lib/systemd/system/linupdate.service /etc/systemd/system/linupdate.service
chmod 550 "$SERVICE"
chown root:root "$SERVICE"

# /usr/bin/systemctl --quiet daemon-reload
/usr/bin/systemctl --quiet daemon-reload

# # Start service
# if /usr/bin/systemctl is-active --quiet linupdate;then
# /usr/bin/systemctl restart --quiet linupdate
# else
# /usr/bin/systemctl start --quiet linupdate
# fi
# fi
# Start service
if /usr/bin/systemctl is-active --quiet linupdate;then
/usr/bin/systemctl restart --quiet linupdate
else
/usr/bin/systemctl start --quiet linupdate
fi
fi

%files
/opt/linupdate/
/etc/linupdate/
# TODO: service is not working for now
# /lib/systemd/system/linupdate.service
/lib/systemd/system/linupdate.service

%changelog

0 comments on commit eb00eec

Please sign in to comment.