mirror of
https://git.freebsd.org/ports.git
synced 2025-06-25 06:30:29 -04:00
ChangeLog: https://download.igniterealtime.org/openfire/docs/4.8.1/changelog.html Improvement * Give explict names to Netty's threads * Have distinct thread pools for each type of connection * Announce support for PubSub delete-item * Admin Console should warn end-user if plugin installation failed * Guard against a surplus of database connection errors being logged * Upgrade postgresql database driver for CVE-2024-1597 New Feature * Add service administration support Bug * When deleting a user, remove it from transient MUC rooms * Cache data inconsistency: MUC * Deleting an admin user does not remove the name from \`admin.authorizedJIDs\` * Do not use default value for user's creation / last modified date * 4.8.0 not counting "whitespace ping" as session activity * RSS News Feed appears empty * Misbehaving Shared-With-Group option for Contact List sharing * Duplicate \(group\)chat messages are received * SerializableCache appears to be unusable \(ClassCastException on creation\) * SerializableCache instances do not get recreated on cluster switch * Cache-summary page shows wrong stats when using Clustering * Delete MUC-based authorization when deleting user * OccupantManager doesn't remove all items when clustering * Session details shows 'resource' column, but does not show resources * Routing Servers cache inconsistency doesn't list the missing items * Contact List \(Roster\) Sharing changes are not immediately applied * Stream Management Resume fails * Disabling client idle time breaks websockets * Resumed stream is no longer resumable PR: 279237 Reported by: nikita@druba.su (maintainer)
103 lines
2.8 KiB
Bash
103 lines
2.8 KiB
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: openfire
|
|
# REQUIRE: NETWORKING SERVERS
|
|
# BEFORE: DAEMON
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# openfire_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable openfire.
|
|
# openfire_user (username): Set to openfire by default.
|
|
# Set it to required username.
|
|
# openfire_group (group): Set to openfire by default.
|
|
# Set it to required group.
|
|
# openfire_libdir (path): Set to %%DATADIR%%/lib by default.
|
|
# Set it to java classes directory.
|
|
# openfire_home (path): Set to %%DATADIR%% by default.
|
|
# Set it to java home directory.
|
|
# openfire_javargs (args): Set to -Xmx256M by default.
|
|
# See java -h for available arguments.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="openfire"
|
|
rcvar=openfire_enable
|
|
load_rc_config $name
|
|
|
|
# Set defaults
|
|
: ${openfire_enable:=NO}
|
|
: ${openfire_user:=${name}}
|
|
: ${openfire_group:=${name}}
|
|
: ${openfire_libdir:=%%DATADIR%%/lib}
|
|
: ${openfire_home:=%%DATADIR%%}
|
|
: ${openfire_javargs:='-Xmx256M'}
|
|
|
|
pidfile=/var/run/${name}.pid
|
|
|
|
required_files="%%ETCDIR%%/openfire.xml"
|
|
java_options=" -server -jar ${openfire_javargs} \
|
|
-Dopenfire.lib.dir=${openfire_libdir} \
|
|
-DopenfireHome=${openfire_home} \
|
|
-Dlog4j.configurationFile=${openfire_libdir}/log4j2.xml"
|
|
|
|
java_command=" %%LOCALBASE%%/openjdk%%JAVA_VERSION%%/bin/java ${java_options} \
|
|
%%DATADIR%%/lib/startup.jar"
|
|
|
|
# Subvert the check_pid_file procname check.
|
|
if [ -f $pidfile ]; then
|
|
read rc_pid junk < $pidfile
|
|
if [ ! -z "$rc_pid" ]; then
|
|
procname=`ps -o command= $rc_pid | awk '{print $1 }'`
|
|
fi
|
|
fi
|
|
|
|
command="/usr/sbin/daemon"
|
|
command_args="-f -p ${pidfile} ${java_command}"
|
|
start_precmd="openfire_precmd"
|
|
status_cmd="openfire_status"
|
|
stop_cmd="openfire_stop"
|
|
|
|
openfire_precmd() {
|
|
touch ${pidfile}
|
|
chown ${openfire_user}:${openfire_group} ${pidfile}
|
|
}
|
|
|
|
openfire_status() {
|
|
rc_pid=$(check_pidfile $pidfile *$procname*)
|
|
|
|
if [ -z "$rc_pid" ]; then
|
|
[ -n "$rc_fast" ] && return 0
|
|
if [ -n "$pidfile" ]; then
|
|
echo "${name} not running? (check $pidfile)."
|
|
else
|
|
echo "${name} not running?"
|
|
fi
|
|
return 1
|
|
fi
|
|
echo "$name is running as pid ${rc_pid}"
|
|
}
|
|
|
|
|
|
openfire_stop() {
|
|
rc_pid=$(check_pidfile $pidfile *$procname*)
|
|
|
|
if [ -z "$rc_pid" ]; then
|
|
[ -n "$rc_fast" ] && return 0
|
|
if [ -n "$pidfile" ]; then
|
|
echo "${name} not running? (check $pidfile)."
|
|
else
|
|
echo "${name} not running?"
|
|
fi
|
|
return 1
|
|
fi
|
|
|
|
echo "Stopping ${name}."
|
|
kill ${rc_pid}
|
|
wait_for_pids ${rc_pid}
|
|
rm ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|