Giter Club home page Giter Club logo

Comments (7)

gduprey avatar gduprey commented on September 13, 2024 1

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

from lightsd.

lopter avatar lopter commented on September 13, 2024

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!

from lightsd.

lopter avatar lopter commented on September 13, 2024

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

from lightsd.

gduprey avatar gduprey commented on September 13, 2024

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.

from lightsd.

lopter avatar lopter commented on September 13, 2024

No, the custom-exec-start.conf file linked previously goes under /etc/systemd/system/lightsd.service.d and overrides values from lightsd.service as explained in the documentation I linked in my first answer.

This will get documented on the lightsd side!

from lightsd.

gduprey avatar gduprey commented on September 13, 2024

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

from lightsd.

pdf avatar pdf commented on September 13, 2024

Could just read and use the /etc/default/lightsd file, rather than requiring overrides:

--- 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

from lightsd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.