bitwarden

This commit is contained in:
jaydee
2024-11-05 18:29:39 +01:00
parent 800eae3a28
commit 8bb2a71d48
2 changed files with 39 additions and 30 deletions

View File

@@ -10,7 +10,7 @@ import json
_DEST = "/share/Photo/imported" _DEST = "/share/Photo/imported"
_DEV = "" _DEV = ""
_DEV_MOUNT = "/share/external/DEV3304_1/" _DEV_MOUNT = "/share/external/DEV3304_1/"
_DEV_DIR = "/share/external/DEV3304_1/DCIM/100GOPRO" _DEV_DIR = "/share/external/DEV3304_1/DCIM/"
_IMP_FILE = "/share/external/DEV3304_1/auto_import" _IMP_FILE = "/share/external/DEV3304_1/auto_import"
_DEV_DATA = "/share/external/DEV3304_1/MISC/version.txt" _DEV_DATA = "/share/external/DEV3304_1/MISC/version.txt"
@@ -43,6 +43,9 @@ while True:
if wifimac == "2474f742c017": if wifimac == "2474f742c017":
_DEV = "gopro9_1" _DEV = "gopro9_1"
print("gopro9_1 registered") print("gopro9_1 registered")
elif wifimac == "2474f7421111":
_DEV = "dji_mini_4"
print("gopro9_1 registered")
if os.path.exists(_IMP_FILE) and _DEV == "": if os.path.exists(_IMP_FILE) and _DEV == "":
print("path exist") print("path exist")
@@ -65,7 +68,11 @@ while True:
status, output = subprocess.getstatusoutput(myCmd) status, output = subprocess.getstatusoutput(myCmd)
if not _DEV == "": if not _DEV == "":
if os.path.exists(_DEV_DIR): if os.path.exists(_DEV_DIR):
for filename in os.listdir(_DEV_DIR): for file_or_dir in os.listdir(_DEV_DIR):
FULL_PATH = os.path.join(_DEV_DIR, file_or_dir)
if os.path.isdir(FULL_PATH):
print(f"Folder: {file_or_dir}")
for filename in os.listdir(FULL_PATH):
print(filename) print(filename)
c_time = os.path.getctime("{}/{}".format(_DEV_DIR,filename)) c_time = os.path.getctime("{}/{}".format(_DEV_DIR,filename))
dt_c = datetime.datetime.fromtimestamp(c_time) dt_c = datetime.datetime.fromtimestamp(c_time)
@@ -92,6 +99,8 @@ while True:
myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=100" myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=100"
subprocess.getstatusoutput(myCmd) subprocess.getstatusoutput(myCmd)
time.sleep(5) time.sleep(5)
else:
print(f"File: {file_or_dir}")
else: else:
print("Nothing to import") print("Nothing to import")
time.sleep(5) time.sleep(5)

View File

@@ -36,7 +36,7 @@ def check_and_write_cert_info(directory_path, output_json_path):
rel_files.append(l[1].replace(";","")) rel_files.append(l[1].replace(";",""))
if line == None: if line == None:
print('no matches found') print('no matches found')
print(rel_files) #print(rel_files)
# fullchain_pem_files = [file for file in files if file.lower() == "fullchain.pem"] # fullchain_pem_files = [file for file in files if file.lower() == "fullchain.pem"]
@@ -45,7 +45,7 @@ def check_and_write_cert_info(directory_path, output_json_path):
fullchain_pem_file = fullchain_pem_file.replace("/data/","/share/docker_data/nginx/data/") fullchain_pem_file = fullchain_pem_file.replace("/data/","/share/docker_data/nginx/data/")
fullchain_pem_file = fullchain_pem_file.replace("/etc/letsencrypt/","/share/docker_data/nginx/letsencrypt/") fullchain_pem_file = fullchain_pem_file.replace("/etc/letsencrypt/","/share/docker_data/nginx/letsencrypt/")
print(f"Checking {fullchain_pem_file}") #print(f"Checking {fullchain_pem_file}")
cert_info = get_cert_info(fullchain_pem_file) cert_info = get_cert_info(fullchain_pem_file)
if cert_info: if cert_info: