--- a/Beremiz_service.py Mon Feb 17 14:27:35 2025 +0100
+++ b/Beremiz_service.py Tue Feb 18 16:19:23 2025 +0100
@@ -78,8 +78,9 @@
-x enable/disable wxTaskbarIcon (0:disable 1:enable) (default:1)
-t enable/disable Twisted web interface (0:disable 1:enable) (default:1)
-w web server port or "off" to disable web server (default:8009)
- -c WAMP client config file (can be overriden by wampconf.json in project)
- -s PSK secret path (default:PSK disabled)
+ -c WAMP client config file or Configuration directory containing "wamconf.json" (default:Wamp disabled, config dir is working_dir) + Note: Wamp config is overriden by wampconf.json given in project files. + -s PSK secret file or existing KeyStore directory containing "psk.txt" (default:PSK disabled, KeyStore is working_dir) -e python extension (absolute path .py)
working_dir - directory where are stored PLC files
@@ -99,6 +100,8 @@
@@ -151,9 +154,28 @@
webport = None if a == "off" else int(a)
- wampconf = None if a == "off" else a
+ _PSKpath = os.path.join(a, "wampconf.json") + if os.path.isfile(_PSKpath): + elif os.path.isfile(a): + ConfDir = os.path.dirname(a) - PSKpath = None if a == "off" else a
+ _PSKpath = os.path.join(a, "psk.txt") + if os.path.isfile(_PSKpath): + elif os.path.isfile(a) or os.path.isdir(os.path.dirname(a)): + KeyStore = os.path.dirname(a) fnameanddirname = list(os.path.split(os.path.realpath(a)))
fnameanddirname.reverse()