Add new check for integrations in BunkerNet job
This commit is contained in:
parent
707256076a
commit
9a325c7a9a
|
@ -62,13 +62,17 @@ def get_integration():
|
|||
try:
|
||||
if getenv("AUTOCONF_MODE") == "yes":
|
||||
return "autoconf"
|
||||
if getenv("SWARM_MODE") == "yes":
|
||||
elif getenv("SWARM_MODE") == "yes":
|
||||
return "swarm"
|
||||
elif getenv("KUBERNETES_MODE") == "yes":
|
||||
return "kubernetes"
|
||||
elif Path("/usr/share/bunkerweb/INTEGRATION").exists():
|
||||
with open("/usr/share/bunkerweb/INTEGRATION", "r") as f:
|
||||
return f.read().strip().lower()
|
||||
elif Path("/usr/share/bunkerweb/INTEGRATION").is_file():
|
||||
return Path("/usr/share/bunkerweb/INTEGRATION").read_text().strip().lower()
|
||||
elif (
|
||||
Path("/etc/os-release").is_file()
|
||||
and "Alpine" in Path("/etc/os-release").read_text()
|
||||
):
|
||||
return "docker"
|
||||
|
||||
return "linux"
|
||||
except:
|
||||
|
|
Loading…
Reference in New Issue