-
-
Notifications
You must be signed in to change notification settings - Fork 895
Rpi servicename #1421
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
Draft
Draft
Rpi servicename #1421
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mfalkvidd
mfalkvidd
force-pushed
the
rpi-servicename
branch
2 times, most recently
from
May 14, 2020 13:40
89b6d3f to
06c419e
Compare
Service rename works, but we also need to handle config file, log file, log pipe, eeprom file and maybe something more. This feature was requested in https://bit.ly/3fL0fLn
* On stderr, the service name is printed on each line. * Print the name of the eeprom file, the log file and the log pipe on startup. Hopefully, this will help people notice when they are running multiple instances, and to distinguish between them.
@mfalkvidd
mfalkvidd
force-pushed
the
rpi-servicename
branch
from
May 14, 2020 13:44
06c419e to
d9fb12a
Compare
This is how I tested:
pi@raspberrypi:~/MySensors $ ./configure --service-name=my2ndmysgw --my-port=5333
pi@raspberrypi:~/MySensors $ make
pi@raspberrypi:~/MySensors $ sudo make install
Installing bin/my2ndmysgw to /usr/local/bin
install -m0644 initscripts/mysgw.systemd /etc/systemd/system/my2ndmysgw.service
systemctl daemon-reload
MySensors gateway has been installed, to add to the boot run:
sudo systemctl enable my2ndmysgw.service
To start the gateway run:
sudo systemctl start my2ndmysgw.service
pi@raspberrypi:~/MySensors $ sudo systemctl enable my2ndmysgw.service
Created symlink /etc/systemd/system/multi-user.target.wants/my2ndmysgw.service → /etc/systemd/system/my2ndmysgw.service.
pi@raspberrypi:~/MySensors $ sudo systemctl start my2ndmysgw.service
/tmp/mysgw.log:
May 16 11:12:46 my2ndmysgw INFO Using log file /tmp/mysgw.log
May 16 11:12:46 my2ndmysgw INFO Starting gateway...
May 16 11:12:46 my2ndmysgw INFO Protocol version - 2.4.0-alpha
May 16 11:12:46 my2ndmysgw INFO Using eeprom file /etc/mysensors.eeprom
May 16 11:12:46 my2ndmysgw DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=0,VER=2.4.0-alpha
May 16 11:12:46 my2ndmysgw DEBUG TSF:LRT:OK
May 16 11:12:46 my2ndmysgw DEBUG TSM:INIT
May 16 11:12:46 my2ndmysgw DEBUG TSF:WUR:MS=0
pi@raspberrypi:~/MySensors $ sudo make uninstall
Stopping daemon my2ndmysgw (ignore errors)
removing files
rm /etc/systemd/system/my2ndmysgw.service /usr/local/bin/my2ndmysgw
THIS IS NOT READY FOR MERGE
My main concern for this feature is that people will start multiple instances without changing the eeprom config file. If 2 or more gateways use the same eeprom file, behavior will not be good and users will be mightily confused.
@mfalkvidd
mfalkvidd
added
the
release-notes
Issues that have information that should be included in the release notes
label
May 16, 2020
@mfalkvidd
mfalkvidd
removed
the
release-notes
Issues that have information that should be included in the release notes
label
May 29, 2020
MySensors-MJChrist
commented
Dec 14, 2020
Is it this ready for testing. I want two use an RS485 and RF24 as two instance on a Raspberry
Yes, you can use it with the caveat posted above.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An attempt to implement the feature requested in #1407
If you can, please test and give feedback.
I am worried that people will use this new feature without thinking, and start multiple instances with the same eeprom file and/or config file. That would get them into big trouble.