This commit is contained in:
Your Name
2025-02-21 11:02:21 +01:00
parent cf9e373ea8
commit 105e439199
17 changed files with 477 additions and 12 deletions

View File

@@ -13,20 +13,21 @@ Attention:
First time: need to create the service file
-->sudo nano /etc/systemd/system/master_nebuleair.service
-->
sudo nano /etc/systemd/system/master_nebuleair.service
<--
⬇️
[Unit]
Description=Master manager for the Python loop scripts
After=network.target
[Service]
ExecStart=/usr/bin/python3 /var/www/nebuleair_pro_4g/master.py
ExecStart=/usr/bin/python3 /var/www/moduleair_pro_4g/master.py
Restart=always
User=root
WorkingDirectory=/var/www/nebuleair_pro_4g
StandardOutput=append:/var/www/nebuleair_pro_4g/logs/master.log
StandardError=append:/var/www/nebuleair_pro_4g/logs/master_errors.log
WorkingDirectory=/var/www/moduleair_pro_4g
StandardOutput=append:/var/www/moduleair_pro_4g/logs/master.log
StandardError=append:/var/www/moduleair_pro_4g/logs/master_errors.log
[Install]
WantedBy=multi-user.target
@@ -56,8 +57,8 @@ import json
import os
# Base directory where scripts are stored
SCRIPT_DIR = "/var/www/nebuleair_pro_4g/"
CONFIG_FILE = "/var/www/nebuleair_pro_4g/config.json"
SCRIPT_DIR = "/var/www/moduleair_pro_4g/"
CONFIG_FILE = "/var/www/moduleair_pro_4g/config.json"
def load_config():
"""Load the configuration file to determine which scripts to run."""