-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
OF-2526 Support SystemD for Debian #2563
base: main
Are you sure you want to change the base?
Conversation
0dac698
to
291e02c
Compare
Rebased |
[Openfire C2S] | ||
title=Openfire XMPP Server - Client to Server (C2S) connections | ||
description=Allow for XMPP clients to connect to the server and also use File Transfers | ||
ports=5222|5223|8010|7777 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the ports are configurable, wouldn't these need to be set at runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it possible. I think that 99% will leave a default. At least this should help to beginner users.
If I wanted to test this, how would I go about it? |
To test it you need to build a debian package:
Then install the deb package
Now you can see a status of the service:
to see the unit use:
Restart, stop, start:
The old sysinit script also should work:
|
…cked Remove unused progname
When establishing an outbound connection, Openfire now prefers the IP family as defined by the order in which the operating system returns addresses. This change is the openfire.init.d is same as was made in 30b4a17 for openfire.sh
291e02c
to
12422c4
Compare
Rebased, the build is green now |
lib/*.jar usr/share/openfire/lib | ||
lib/log4j2.xml etc/openfire | ||
resources/database usr/share/openfire/resources | ||
conf/openfire.xml etc/openfire | ||
conf/security.xml etc/openfire | ||
resources/security etc/openfire | ||
plugins var/lib/openfire | ||
dist/* / |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's happening with this line? and why is /usr
above being mixed with usr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the dist folder for supplementary files that just needed to be copied as is. Currently there is the Systemd's openfire servise unit file and the UFW firewall rules. All the files and folders inside of it will be copied into root with the same paths.
[Openfire Connection Manager] | ||
title=Openfire XMPP Server - Connection Manager | ||
description=Openfire Connection Manager improves the scalability of server by handling a portion of the client connections | ||
ports=5262|5263 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far I understood the connection manager is in fact an internal thing. And it probably not used so often. Then I think it would be better to remove the rule. Please confirm.
I added them anyway because I saw that the ports are exposed in the Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of changes are cleanup of the existing shell scripts
Friendly remind on this. I can split the PR to make it easier to review. |
https://igniterealtime.atlassian.net/browse/OF-2526
I added the openfire.service to run the Openfire directly from SystemD.
The init.d script remains and even installed but it looks like it's not used if the unit's service file exists.
The SystemD itself will call the openfire.sh script. So I added the script to be installed into
/usr/share/openfire/bin/openfire.sh
. The script itself is has a problem with detection ofOPENFIRE_HOME
when the value of the var is overwritten few times. I didn't fixed that.The existing file
/etc/default/openfire
is also supported by the SystemD unit.There are additional commits to improve:
23-ea
JDK version.sudo systemctl edit openfire.slice
. The JRE by default uses only 25% of total RAM. So many servers may simply not use the whole RAM that they have. We may change this with Java's-Xmx
but I think it would be more correct to use the whole RAM with the-XX:MaxRAMPercentage=100
but limit with the SystemD slice settings if needed. This will be simpler for people who aren't familiar with Java options to reuse their existing knowledge.