diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-im/openfire/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-im/openfire/files')
-rw-r--r-- | net-im/openfire/files/openfire-confd | 11 | ||||
-rw-r--r-- | net-im/openfire/files/openfire-initd | 29 | ||||
-rw-r--r-- | net-im/openfire/files/openfire.service | 13 |
3 files changed, 53 insertions, 0 deletions
diff --git a/net-im/openfire/files/openfire-confd b/net-im/openfire/files/openfire-confd new file mode 100644 index 000000000000..35caecef20cc --- /dev/null +++ b/net-im/openfire/files/openfire-confd @@ -0,0 +1,11 @@ +OPENFIRE_HOME=/opt/openfire +OPENFIRE_LIB="${OPENFIRE_HOME}/lib" +OPENFIRE_OPTS="-Xmx256m -DopenfireHome=${OPENFIRE_HOME} -Dopenfire.lib.dir=${OPENFIRE_LIB}" +OPENFIRE_CLASS="-classpath ${OPENFIRE_LIB}/startup.jar" +OPENFIRE_JAR="-jar ${OPENFIRE_LIB}/startup.jar" +OPENFIRE_ARGS="-server ${OPENFIRE_OPTS} ${OPENFIRE_CLASS} ${OPENFIRE_JAR}" + + +#JVM used by the openfire server. You can see a list of available vm's in /usr/lib/jvm/ +#But remenber that openfire needs a 1.5 jvm +GENTOO_VM=sun-jdk-1.5 diff --git a/net-im/openfire/files/openfire-initd b/net-im/openfire/files/openfire-initd new file mode 100644 index 000000000000..281e5197af2c --- /dev/null +++ b/net-im/openfire/files/openfire-initd @@ -0,0 +1,29 @@ +#!/sbin/openrc-run + +depend() { + need net + provide jabber-server +} + +start() { + [ -d /var/run/jabber ] || mkdir /var/run/jabber + #source /etc/env.d/java/20sun-jdk-1.5.0.06 + #OPENFIRE_CMD="${JAVA_HOME}/bin/java" + OPENFIRE_CMD=`GENTOO_VM=${GENTOO_VM} java-config -J` + + ebegin "Starting Openfire Server" + start-stop-daemon \ + --user jabber \ + --background \ + --make-pidfile \ + --pidfile /var/run/jabber/openfire.pid \ + --start \ + --exec ${OPENFIRE_CMD} -- ${OPENFIRE_ARGS} > /var/log/openfire.log 2>&1 + eend +} + +stop() { + ebegin "Stopping Openfire Messenger" + start-stop-daemon --pidfile /var/run/jabber/openfire.pid --stop + eend +} diff --git a/net-im/openfire/files/openfire.service b/net-im/openfire/files/openfire.service new file mode 100644 index 000000000000..6f2ff26ed497 --- /dev/null +++ b/net-im/openfire/files/openfire.service @@ -0,0 +1,13 @@ +[Unit] +Description=Openfire XMPP Server +After=network.target + +[Service] +User=jabber +Group=jabber +PrivateTmp=true +ExecStart=/usr/bin/java -server -Xmx256m -DopenfireHome=/opt/openfire -Dopenfire.lib.dir=/opt/openfire/lib -classpath /opt/openfire/lib/startup.jar -jar /opt/openfire/lib/startup.jar +SuccessExitStatus=143 SIGKILL + +[Install] +WantedBy=multi-user.target |