Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Sep 23, 2024
1 parent e999472 commit cf0517b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/controllers/Service/Service.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ class Service:
#
#-----------------------------------------------------------------------------------------------
def restart(self, update_summary: list):
# If systemctl is not installed (e.g. in docker container of linupdate's CI), do nothing
if not Path('/usr/bin/systemctl').is_file():
print('\n systemctl is not installed, skipping service restart')
return

# Retrieve services to restart
services = Config().get_service_to_restart()

Expand All @@ -31,6 +26,11 @@ def restart(self, update_summary: list):
if updated_packages == 0:
return

# Quit if systemctl is not installed (e.g. in docker container of linupdate's CI)
if not Path('/usr/bin/systemctl').is_file():
print('\n systemctl is not installed, skipping service restart')
return

print('\n Restarting services')

# If no services to restart, skip
Expand Down

0 comments on commit cf0517b

Please sign in to comment.