remove USER_FILE usage in ssl_decrypt.py and ssl_encrypt.py; switch to argparse for command-line arguments

This commit is contained in:
2025-05-21 21:29:21 +02:00
parent 4cdcfadbac
commit 5ac37ad9ad
7 changed files with 106 additions and 70 deletions

View File

@ -3,15 +3,14 @@
This script belongs to wirepy and is for the auto start of the tunnel
"""
import subprocess
from subprocess import CompletedProcess
from subprocess import CompletedProcess, run
from wp_app_config import AppConfig
from common_tools import ConfigManager
ConfigManager.init(AppConfig.SETTINGS_FILE)
if ConfigManager.get("autostart") != "off":
process: CompletedProcess[str] = subprocess.run(
process: CompletedProcess[str] = run(
["nmcli", "connection", "up", ConfigManager.get("autostart")],
capture_output=True,
text=True,