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 39698f1 commit 04c1d13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/controllers/Service/Service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import subprocess
import re
from colorama import Fore, Style
from pathlib import Path

# Import classes
from src.controllers.App.Config import Config
Expand All @@ -15,6 +16,11 @@ 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 Down

0 comments on commit 04c1d13

Please sign in to comment.