summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorAmadeusz Żołnowski <aidecoe@gentoo.org>2016-07-02 23:15:49 +0100
committerAmadeusz Żołnowski <aidecoe@gentoo.org>2016-07-03 08:44:06 +0100
commitf888bec998225e36910b02954e40593aff2bd15e (patch)
tree4da2fb15d74212cfd72daec32e9b9a9c0e0bd28c /net-im
parentnet-im/ejabberd: Add reload option to initd script (diff)
downloadgentoo-f888bec998225e36910b02954e40593aff2bd15e.tar.gz
gentoo-f888bec998225e36910b02954e40593aff2bd15e.tar.bz2
gentoo-f888bec998225e36910b02954e40593aff2bd15e.zip
net-im/ejabberd: Make ejabberd.service from upstream template
Gentoo-Bug: 587454 Package-Manager: portage-2.3.0
Diffstat (limited to 'net-im')
-rw-r--r--net-im/ejabberd/ejabberd-16.04.ebuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/net-im/ejabberd/ejabberd-16.04.ebuild b/net-im/ejabberd/ejabberd-16.04.ebuild
index b7f818f960e0..441023e8c5b2 100644
--- a/net-im/ejabberd/ejabberd-16.04.ebuild
+++ b/net-im/ejabberd/ejabberd-16.04.ebuild
@@ -134,6 +134,15 @@ get_ejabberd_path() {
echo "$(get_erl_libs)/${P}"
}
+# Make ejabberd.service for systemd from upstream provided template.
+make_ejabberd_service() {
+ sed -r \
+ -e 's!@ctlscriptpath@!/usr/sbin!' \
+ -e 's!(User|Group)=(.*)!\1=jabber!' \
+ "${PN}.service.template" >"${PN}.service" \
+ || die 'failed to make ejabberd.service'
+}
+
# Set paths to defined by net-im/jabber-base.
set_jabberbase_paths() {
sed -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
@@ -168,6 +177,7 @@ src_prepare() {
rebar_remove_deps
correct_ejabberd_paths
set_jabberbase_paths
+ make_ejabberd_service
skip_docs
adjust_config
customize_epam_wrapper "${FILESDIR}/epam-wrapper"
@@ -215,7 +225,7 @@ src_install() {
newconfd "${FILESDIR}/${PN}-3.confd" "${PN}"
newinitd "${FILESDIR}/${PN}-3.initd" "${PN}"
- systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_dounit "${PN}.service"
systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
insinto /etc/logrotate.d