corretto servizio e altre cose

This commit is contained in:
2021-02-24 16:40:35 +01:00
parent 0d4bcb7413
commit d11f3ec243
5 changed files with 22 additions and 25150 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"version": "0.2",
"logFile": "./Nasoscope.log",
"logFile": "/var/log/nasoscopio.log",
"logFormat": "%(asctime)s|%(levelname)-7s|%(funcName)-10s|%(lineno)-3d: %(message)-50s",
"logTimeFormat": "%m-%d %H:%M:%S",
"URL": "http://localhost:8080",
@@ -8,7 +8,7 @@
"loopPeriod": 0.5,
"recordTime": 3600,
"fileSaveTime": 360,
"fileSaveDir": "./{}_CL3015HSD.{fType}",
"fileSaveDir": "/tmp/{}_CL3015HSD.{fType}",
"fileType": "csv",
"variables": [ {"deviceID":1,
"name": "AsseX",

File diff suppressed because it is too large Load Diff

View File

@@ -396,10 +396,13 @@ if __name__ == '__main__':
if not settings['sendMqtt']:
saveSamples(samples)
LOGGER.warning("Chiudo il Canale")
firstLoop = True
stat = "IDLE"
pass
elif stat == "IDLE":
LOGGER.info("Pronto a Iniziare Cattura")
if firstLoop:
LOGGER.info("Pronto a Iniziare Cattura")
firstLoop = False
else:
pass
time.sleep(settings["loopPeriod"])

View File

@@ -0,0 +1,16 @@
[Unit]
Description=Nasoscopio - Letture Movimento Assi Materia-CL
Requires=network.target mosquitto.service docker.service
[Service]
RestartSec=15s
Type=simple
User=root
Group=root
WorkingDirectory=/root/NasoScopio/NasoScope/
ExecStart=/usr/bin/python3 nasomain.py
PIDFile=/run/Nasoscopio.pid
Restart=always
[Install]
WantedBy=multi-user.target