Merge branch 'ejabberd-cleanup'

This commit is contained in:
Amadeusz Żołnowski
2016-08-27 14:11:38 +01:00
4 changed files with 7 additions and 23 deletions
+6 -5
View File
@@ -63,6 +63,7 @@ DEPEND="${CDEPEND}
RDEPEND="${CDEPEND}
captcha? ( media-gfx/imagemagick[truetype,png] )"
DOCS=( README )
PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch" )
EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
@@ -114,7 +115,7 @@ ejabberd_cert_exists() {
for cert in $(gawk -- \
'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
"${EROOT}${JABBER_ETC}/ejabberd.yml"); do
"${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
[[ -f ${cert} ]] && return 0
done
@@ -126,8 +127,8 @@ ejabberd_cert_exists() {
ejabberd_cert_install() {
SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
install_cert "${EJABBERD_CERT%.*}"
chown root:jabber "${EROOT}${EJABBERD_CERT}" || die
chmod 0440 "${EROOT}${EJABBERD_CERT}" || die
chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
}
# Get path to ejabberd lib directory.
@@ -224,8 +225,8 @@ src_install() {
fperms 4750 "${epam_path}"
fi
newconfd "${FILESDIR}/${PN}-3.confd" "${PN}"
newinitd "${FILESDIR}/${PN}-3.initd" "${PN}"
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
systemd_dounit "${PN}.service"
systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-17
View File
@@ -1,17 +0,0 @@
[Unit]
Description=A distributed, fault-tolerant Jabber/XMPP server
After=network.target
[Service]
Type=oneshot
User=jabber
LimitNOFILE=16000
RestartSec=5
ExecStart=/usr/sbin/ejabberdctl \
--config /etc/jabber/ejabberd.cfg --ctl-config /etc/jabber/ejabberdctl.cfg \
--logs "/var/log/jabber" --spool "/var/spool/jabber" start
ExecStop=/usr/sbin/ejabberdctl stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target