corretto servizio e altre cose
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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",
|
||||
|
||||
24244
NasoScope/get-pip.py
24244
NasoScope/get-pip.py
File diff suppressed because it is too large
Load Diff
@@ -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"])
|
||||
|
||||
16
NasoScope/nasoscopio.service
Normal file
16
NasoScope/nasoscopio.service
Normal 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
|
||||
Reference in New Issue
Block a user