update
This commit is contained in:
17
master.py
17
master.py
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user