Skip to content

Commit

Permalink
fix: removed check on exit code for service start only
Browse files Browse the repository at this point in the history
  • Loading branch information
MRColorR committed Dec 13, 2024
1 parent 86192e3 commit cff9ca9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ def setup_service(service_name="docker.binfmt", service_file_path='./.resources/
subprocess.run(["sudo", "cp", service_file_path, systemd_service_file], check=True)
subprocess.run(["sudo", "systemctl", "daemon-reload"], check=True)
subprocess.run(["sudo", "systemctl", "enable", service_name], check=True)
subprocess.run(["sudo", "systemctl", "start", service_name], check=True)
subprocess.run(["sudo", "systemctl", "start", service_name])
elif os.path.exists("/etc/init.d"):
if not os.path.exists(sysv_init_file):
logging.info(f"Copying service file to {sysv_init_file}")
subprocess.run(["sudo", "cp", service_file_path, sysv_init_file], check=True)
subprocess.run(["sudo", "chmod", "+x", sysv_init_file], check=True)
subprocess.run(["sudo", "update-rc.d", service_name, "defaults"], check=True)
subprocess.run(["sudo", "service", service_name, "start"], check=True)
subprocess.run(["sudo", "service", service_name, "start"])

logging.info(f"{Fore.GREEN}{service_name} setup and started successfully.{Style.RESET_ALL}")

Expand Down

0 comments on commit cff9ca9

Please sign in to comment.