You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
I want this to start as a service whenever the gateway reboots. To get this to work some specific settings are needed. It would be useful to include a systemd service file in the distribution and some instructions on how to install it. I'm using the following but it may or may not have all the things needed (for example, cleanup of the db on shutdown, restart on crash, etc):
Note I run this with an account with normal user privileges created for the purpose. To install, copy the above to /etc/systemd/system/thing-directory.service and invoke
Note also the various options (-c, -h, -d, -l) to start the service. These should also be documented somewhere. The first two are useful to remap ports. It turns out the last two MUST be specified for the service to work as they by default try to create files in / (which won't work unless you run the service as root, which is unnecessary and unsafe).
I also install the thingweb-directory github clone under /opt/thingweb-directory. Another option (maybe better) would be to put it under /home/thingdirectory, the home directory of the user that runs the service.
Yet another option would be to put the whole thing in a container (either a snap or a docker container).
Note the use of a special account (with minimum privileges) to run. I also give an example of mapping it to a different port. The documentation can show this but perhaps use the default port. My previous comments about documenting the options somewhere is still relevant (yes, they are available with -help, but that is annoying).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want this to start as a service whenever the gateway reboots. To get this to work some specific settings are needed. It would be useful to include a systemd service file in the distribution and some instructions on how to install it. I'm using the following but it may or may not have all the things needed (for example, cleanup of the db on shutdown, restart on crash, etc):
Note I run this with an account with normal user privileges created for the purpose. To install, copy the above to /etc/systemd/system/thing-directory.service and invoke
Also, the following commands are useful for monitoring the service:
And for shutting it down/turning off automatic startup on boot:
~
The text was updated successfully, but these errors were encountered: