Comments (7)
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.
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.
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.
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.
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.
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.
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)
- Suggestions for "event" publication? HOT 1
- Doesn't work behind nginx proxy HOT 3
- Building lightsd on FreeBSD fails - missing endian.h HOT 17
- The `-d/--daemonize' option doesn't work on *BSD
- Building on raspbian fails on signing dsc files HOT 3
- Nitpick: lightsc.py license header confusing HOT 1
- lightsd: can't setup lightsd: Address already in use HOT 13
- Not finding Gen2 LIFX Color bulbs with 1.20 firmware HOT 3
- What are the tags? HOT 3
- New LIFX Product ID HOT 1
- Wrong type for temperature value HOT 1
- Is anybody working on an Home Assistant component? HOT 2
- New firmware and deprecated messages crashes bulbs HOT 4
- 0 connected HOT 5
- lightsd crash when refreshing state from bulb HOT 4
- Add support for a transition argument to power{On,Off,Toggle} HOT 16
- Firmware updating/onboarding HOT 1
- Numbers in E notation aren't supported by the JSON parser
- Add notes how to set one part of color or temp HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightsd.