diff options
author | xengineering <mail2xengineering@protonmail.com> | 2020-10-15 12:48:30 +0200 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2020-10-15 12:48:30 +0200 |
commit | 3f739baab456c2cc977f11090381d1f61eb023c4 (patch) | |
tree | a35293cd7a0164601213bdfbd10774a1e998ebc1 /main.py | |
parent | 449b490f233371fe28e9089a05982cd5634285d2 (diff) | |
download | iot-barcode-scanner-3f739baab456c2cc977f11090381d1f61eb023c4.tar iot-barcode-scanner-3f739baab456c2cc977f11090381d1f61eb023c4.tar.zst iot-barcode-scanner-3f739baab456c2cc977f11090381d1f61eb023c4.zip |
Split Executable to reduce root-priviledged Code Execution
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/main.py b/main.py deleted file mode 100755 index b50962a..0000000 --- a/main.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/python3 - - -"""Main executable for the Package / Service""" - - -import iot_barcode_scanner as ibs - - -def main(): - try: - config = ibs.get_config() - mqtt_service = ibs.MqttService(config) - mqtt_service.run() - print("Starting Service") - while True: - text = input() - mqtt_service.client.publish( - config["mqtt"]["topic"], - payload=text, - qos=0, - retain=False - ) - except KeyboardInterrupt: - print("Service stopped") - - -if __name__ == "__main__": - main() |