Create z2mqtt.service

This commit is contained in:
Beeranco 2023-06-05 20:00:35 +02:00 committed by GitHub
parent dea03501db
commit 3b64d5fc5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

16
z2mqtt.service Normal file
View File

@ -0,0 +1,16 @@
[Unit]
Description=zigbee2mqtt
After=network.target
[Service]
Environment=NODE_ENV=production
ExecStart=/usr/bin/npm start
WorkingDirectory=/opt/zigbee2mqtt
StandardOutput=null
StandardError=inherit
Restart=always
RestartSec=10s
User=root
[Install]
WantedBy=multi-user.target