Optimize directory scan paths for Linux client agents
This commit is contained in:
@@ -16,7 +16,7 @@ CLIENT_ID=""
|
||||
|
||||
# For Production deployment, use: "http://rmm-backend.seekright.com"
|
||||
# For Local WSL testing on your laptop, use: "http://172.18.16.1:8000"
|
||||
CENTRAL_URL="http://172.18.16.1:8000"
|
||||
CENTRAL_URL="http://rmm-backend.seekright.com"
|
||||
|
||||
# Check if Client ID is set; if not, check command line arguments, otherwise default to hostname
|
||||
if [ -z "$CLIENT_ID" ]; then
|
||||
@@ -267,7 +267,9 @@ def check_takeleap_folders():
|
||||
if os.name == "nt":
|
||||
drives = [f"{letter}:\\" for letter in string.ascii_uppercase if os.path.exists(f"{letter}:\\")]
|
||||
else:
|
||||
drives = ["/"]
|
||||
drives = ["/mnt", "/media", "/home"]
|
||||
if os.path.exists("/TAKELEAP"):
|
||||
drives.append("/TAKELEAP")
|
||||
|
||||
for drive in drives:
|
||||
for root, dirs, files in os.walk(drive, topdown=True):
|
||||
@@ -309,7 +311,9 @@ def list_takeleap_parent():
|
||||
if os.name == "nt":
|
||||
drives = [f"{letter}:\\" for letter in string.ascii_uppercase if os.path.exists(f"{letter}:\\")]
|
||||
else:
|
||||
drives = ["/"]
|
||||
drives = ["/mnt", "/media", "/home"]
|
||||
if os.path.exists("/TAKELEAP"):
|
||||
drives.append("/TAKELEAP")
|
||||
|
||||
for drive in drives:
|
||||
for root, dirs, files in os.walk(drive, topdown=True):
|
||||
@@ -343,7 +347,9 @@ def list_takeleap_subfolder(subfolder_name):
|
||||
if os.name == "nt":
|
||||
drives = [f"{letter}:\\" for letter in string.ascii_uppercase if os.path.exists(f"{letter}:\\")]
|
||||
else:
|
||||
drives = ["/"]
|
||||
drives = ["/mnt", "/media", "/home"]
|
||||
if os.path.exists("/TAKELEAP"):
|
||||
drives.append("/TAKELEAP")
|
||||
|
||||
for drive in drives:
|
||||
for root, dirs, files in os.walk(drive, topdown=True):
|
||||
|
||||
Reference in New Issue
Block a user