-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ship a systemd drop-in example (to e.g. add a --listen option) and document it #26
Comments
Hello @gduprey, Sorry for the troubles, I think a better approach will be to ship a systemd drop-in (see systemd.unit(5)) with the examples and explain how to use it to in the documentation. Let me know what you think. Thanks for the report! |
It wasn't much of a trouble. And I think the drop in or just updates to docs (where to apply the change for listening on a network port -- for upstart and systemd) would be fine. It wasn't a big deal, just unexpected and took about 10 minutes to figure out. Gerry |
Not released nor documented yet but I just pushed an example systemd drop-in: https://github.com/lopter/lightsd/blob/master/examples/custom-exec-start.conf |
So this is just an example of modifying the supplied dist/lightsd.service to enable the network listener when using a systemd based install, correct? Might be worth a mention in there or elsewhere that this is how you enable network for a systemd system and that the /etc/default/lightsd is ignored in that case (or add it to the distribution /etc/default/lightsd in comments that it's not applicable for systemd based systems). I thought the dist/lightsd.service was a well done file, just didn't know I had to alter it to enable network listening. So anything to just make a pointer to where to do it should be of use to folks going forward. |
No, the This will get documented on the lightsd side! |
That's great! Still a novice on using systemd config files and didn't know you could have override files with just select key replacement. That's good to know and I agree -- with that option, adding network support with such a thing is a very clean solution |
Could just read and use the --- lightsd.service 2017-02-13 06:55:34.000000000 +1100
+++ lightsd.service 2019-06-05 01:00:31.631523776 +1000
@@ -3,7 +3,8 @@
After=network.target
[Service]
-ExecStart=/usr/bin/lightsd -t -v warning -s %t/lightsd/socket -c %t/lightsd/pipe
+EnvironmentFile=-/etc/default/lightsd
+ExecStart=/usr/bin/lightsd -t -v warning -s %t/lightsd/socket -c %t/lightsd/pipe $DAEMON_OPTS
User=lightsd
Group=lightsd
RuntimeDirectory=lightsd |
I run lightsd with -l to allow connections from network based clients. I recently updated my OS to ubuntu 16.04 and lightsd to 1.2.1 and noticed it was no longer paying attention to my DAEMON_OPTS= line in /etc/default/lightsd. This is due to using systemd now, which is fine, but might be worth mentioning that /etc/default/lightsd isn't used on systemd systems and changes to options should be done in the service file.
Just a suggestion.
The text was updated successfully, but these errors were encountered: