kopia lustrzana https://github.com/mate-dev/mmrelaynode
Getting closer, command_wrapper needs work
rodzic
cabca66846
commit
f19ce7b703
|
@ -5,8 +5,10 @@ import time
|
||||||
def execute_meshtastic_command(options):
|
def execute_meshtastic_command(options):
|
||||||
"""Execute a meshtastic command with the given options."""
|
"""Execute a meshtastic command with the given options."""
|
||||||
command = ["meshtastic", "--host", "mmrelaydevice", "--port", "4403"] + options.split()
|
command = ["meshtastic", "--host", "mmrelaydevice", "--port", "4403"] + options.split()
|
||||||
subprocess.run(command)
|
print(f"Executing command: {' '.join(command)}") # Add this line for debugging
|
||||||
time.sleep(30) # Pause for 30 seconds
|
result = subprocess.run(command, capture_output=True, text=True)
|
||||||
|
print(result.stdout) # Add this line to print the output
|
||||||
|
time.sleep(15) # Pause for 30 seconds
|
||||||
|
|
||||||
# Loop through environment variables in sequence
|
# Loop through environment variables in sequence
|
||||||
index = 1
|
index = 1
|
||||||
|
@ -17,6 +19,3 @@ while True:
|
||||||
index += 1
|
index += 1
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
# Finally, run the main Meshtastic process (or whatever process you want to keep the container running)
|
|
||||||
subprocess.run(["meshtastic"])
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
printenv
|
||||||
/home/mesh/.local/bin/wait-for-it.sh mmrelaydevice:4403 -t 60
|
/home/mesh/.local/bin/wait-for-it.sh mmrelaydevice:4403 -t 60
|
||||||
python3 command_wrapper.py
|
python3 /home/mesh/app/command_wrapper.py
|
||||||
python3 conf_wrapper.py
|
python3 /home/mesh/app/conf_wrapper.py
|
||||||
python3 main.py
|
python3 /home/mesh/app/main.py
|
Ładowanie…
Reference in New Issue