Ubuntu Server autostart. #43
Unanswered
bjoern-gringer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First: Thank you for the great tool!
My Linux knowledge is medium.
The tool started by hand, is working perfekt but I have a problem with the autostart of noah-mqtt.
This is what I have done:
sudo nano /etc/systemd/system/noah-mqtt.service
I filled the file with:
`________________________________________________________________
[Unit]
Description=Noah-mqtt wird gestartet
After=network.target
[Service]
Environment=NODE_ENV=production
Type=notify
ExecStart=GROWATT_USERNAME=growatt_XXXXX GROWATT_PASSWORD=XXXXXXXXXX3MTH33 MQTT_HOST=192.168.178.46 MQTT_PORT=1883 ./noah-mqtt
WorkingDirectory=/opt/noah-mqtt
StandardOutput=inherit
StandardError=inherit
WatchdogSec=10s
Restart=always
RestartSec=10s
User=bjoern
[Install]
WantedBy=multi-user.target
`
Next:
sudo systemctl daemon-reload
sudo systemctl enable noah-mqtt
sudo systemctl start noah-mqtt
But now, if I check the status with:
sudo systemctl status noah-mqtt
I get the Failuremessage:
`
`Nov 26 16:17:11 bjoern-GK41 systemd[1]: Starting Noah-mqtt wird gestartet...
Nov 26 16:17:11 bjoern-GK41 systemd[7997]: noah-mqtt.service: Failed to locate executable GROWATT_USERNAME=growatt_XXXX: No such file or directory
Nov 26 16:17:11 bjoern-GK41 systemd[7997]: noah-mqtt.service: Failed at step EXEC spawning GROWATT_USERNAME=growatt_XXX: No such file or directory
Nov 26 16:17:11 bjoern-GK41 systemd[1]: noah-mqtt.service: Main process exited, code=exited, status=203/EXEC
Nov 26 16:17:11 bjoern-GK41 systemd[1]: noah-mqtt.service: Failed with result 'exit-code'.
Nov 26 16:17:11 bjoern-GK41 systemd[1]: Failed to start Noah-mqtt wird gestartet.
`
I hope someone can help me.
Nice greetings from Hamburg Björn
Beta Was this translation helpful? Give feedback.
All reactions