Skip to content

Commit

Permalink
Merge pull request #108 from MRColorR/emulation-layer-status-patch
Browse files Browse the repository at this point in the history
fix: removed check on exit code for service start only
  • Loading branch information
MRColorR authored Dec 13, 2024
2 parents 9934d8a + cff9ca9 commit 69a24d1
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 69a24d1

Please sign in to comment.