summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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 $?
}