summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-04-30 10:06:55 +0200
committerFabian Groffen <grobian@gentoo.org>2017-04-30 10:08:06 +0200
commit7df95ab46cf9636cdc9890430ed6709696fa4237 (patch)
tree2c2eba5fd3efaffd890b134e6ae42ed4f5d3b5e4 /app-misc/carbon-c-relay
parentx11-misc/zim: Version bump. (diff)
downloadgentoo-7df95ab46cf9636cdc9890430ed6709696fa4237.tar.gz
gentoo-7df95ab46cf9636cdc9890430ed6709696fa4237.tar.bz2
gentoo-7df95ab46cf9636cdc9890430ed6709696fa4237.zip
app-misc/carbon-c-relay: revbump 3.1 to fix pidfile creation permission issues on some systems
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-misc/carbon-c-relay')
-rw-r--r--app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild (renamed from app-misc/carbon-c-relay/carbon-c-relay-3.1.ebuild)0
-rw-r--r--app-misc/carbon-c-relay/files/carbon-c-relay.confd-r13
-rw-r--r--app-misc/carbon-c-relay/files/carbon-c-relay.initd-r110
3 files changed, 7 insertions, 6 deletions
diff --git a/app-misc/carbon-c-relay/carbon-c-relay-3.1.ebuild b/app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild
index c017ee525eb4..c017ee525eb4 100644
--- a/app-misc/carbon-c-relay/carbon-c-relay-3.1.ebuild
+++ b/app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 b/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1
index 64e4ab5c832e..5233eec2d2a1 100644
--- a/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1
@@ -4,9 +4,6 @@
# routing file to read
#ROUTES_FILE=/etc/carbon-c-relay.conf
-# where to store the PID-file
-#PIDFILE=/run/carbon-c-relay.pid
-
# where to store the logfile
#LOGFILE=/var/log/carbon-c-relay.log
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 b/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1
index 104a7e0878e9..1e2734941cc1 100644
--- a/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1
@@ -13,7 +13,7 @@ routes_config=${ROUTES_FILE:-/etc/${SVCNAME}.conf}
command="/usr/bin/carbon-c-relay"
command_args="-f ${routes_config} ${EXTRA_OPTS}"
-pidfile=${PIDFILE:-/run/${SVCNAME}.pid}
+pidfile="/run/carbon-c-relay/${SVCNAME}.pid"
logfile=${LOGFILE:-/var/log/${SVCNAME}.log}
user=${USER:-carbon}
group=${GROUP:-carbon}
@@ -28,7 +28,8 @@ start_pre() {
configtest || return 1
fi
touch "${logfile}"
- chown ${user}:${group} "${logfile}"
+ mkdir -p "${pidfile%/*}"
+ chown ${user}:${group} "${logfile}" "${pidfile%/*}"
}
stop_pre() {
@@ -52,7 +53,10 @@ start() {
stop() {
ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --exec ${command} --pidfile "${pidfile}"
+ # migration path
+ local pfile=${pidfile}
+ [[ -e /run/carbon-c-relay.pid ]] && pfile="/run/carbon-c-relay.pid"
+ start-stop-daemon --stop --exec ${command} --pidfile "${pfile}"
eend $?
}