service file

This commit is contained in:
Wolfgang Hottgenroth 2018-05-16 10:39:12 +02:00
parent d8f35a127a
commit bf520d25b8
2 changed files with 19 additions and 1 deletions

View File

@ -19,7 +19,7 @@
"topics": [ "IoT/RainSensor1/#" ],
"encapsulate": true,
"parsePayload": true,
"verbose": true
"verbose": false
}
]
}

18
mqttMongo.service Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=mqttMongo
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
GuessMainPID=yes
ExecStart=/usr/bin/npm start -- -c MqttMongoNodejs-Prod.conf
ExecStop=kill -SIGINT $mainpid
Restart=on-failure
WorkingDirectory=/opt/services/MqttMongoNodejs
[Install]
Alias=mqttMongo
WantedBy=multi-user.target