Skip to content

Autostart in background / Docker image #5

Answered by koenvervloesem
joddye2 asked this question in Q&A
Discussion options

You must be logged in to vote

This works for me on a Raspberry Pi 4:

Install TheengsGateway as root (see later for why this is):

sudo pip3 install TheengsGateway

Then create this systemd service script in /etc/systemd/system/TheengsGateway.service:

[Unit]
Description=Theengs Gateway
After=network.target
[Service]
Restart=always
Type=simple
ExecStart=/usr/bin/python3 -m TheengsGateway -H host -u user -p password

[Install]
WantedBy=multi-user.target

Use your host, username and password for the MQTT broker.

Then reload the service files and start and enable the system service:

sudo systemctl daemon-reload
sudo systemctl enable --now TheengsGateway.service

Check whether the gateway is running:

systemctl status Theengs…

Replies: 11 comments 40 replies

Comment options

You must be logged in to vote
1 reply
@joddye2
Comment options

Comment options

You must be logged in to vote
1 reply
@joddye2
Comment options

Comment options

You must be logged in to vote
6 replies
@Werner-G
Comment options

@joddye2
Comment options

@Werner-G
Comment options

@joddye2
Comment options

@joddye2
Comment options

Answer selected by joddye2
Comment options

You must be logged in to vote
1 reply
@koenvervloesem
Comment options

Comment options

You must be logged in to vote
1 reply
@1technophile
Comment options

Comment options

You must be logged in to vote
3 replies
@1technophile
Comment options

@1technophile
Comment options

@1technophile
Comment options

Comment options

You must be logged in to vote
1 reply
@1technophile
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@1technophile
Comment options

@mihsu81
Comment options

@pnieweglowski
Comment options

@pnieweglowski
Comment options

@1technophile
Comment options

Comment options

You must be logged in to vote
15 replies
@mihsu81
Comment options

@1technophile
Comment options

@mihsu81
Comment options

@1technophile
Comment options

@mihsu81
Comment options

Comment options

You must be logged in to vote
2 replies
@JeewanBahra
Comment options

@RadianM
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
9 participants