From b5c2af0c579603aa731550cdc4ea0ac1aa1be5d3 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 30 May 2013 08:26:09 +0200 Subject: [PATCH] =?utf8?q?contrib/redhat/init.d-collectd:=20Rename=20varia?= =?utf8?q?ble=20to=20=E2=80=A6PIDDIR.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Github: #298 --- contrib/redhat/init.d-collectd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/redhat/init.d-collectd b/contrib/redhat/init.d-collectd index 52bf7433..abdb168f 100644 --- a/contrib/redhat/init.d-collectd +++ b/contrib/redhat/init.d-collectd @@ -18,16 +18,16 @@ prog="collectdmon" service="collectd" CONFIG=/etc/collectd.conf COLLECTD=/usr/sbin/collectd -COLLECTDMONPIDIR="/var/run" -COLLECTDMONPID="$COLLECTDMONPIDIR/collectdmon.pid" +COLLECTDMONPIDDIR="/var/run" +COLLECTDMONPID="$COLLECTDMONPIDDIR/collectdmon.pid" if [ -r /etc/sysconfig/$service ]; then . /etc/sysconfig/$service fi -if [ ! -d $COLLECTDMONPIDIR ]; then - mkdir -p $COLLECTDMONPIDIR - [ -n "${RUNAS-}" ] && chown $RUNAS: $COLLECTDMONPIDIR +if [[ ! -d $COLLECTDMONPIDDIR ]]; then + mkdir -p $COLLECTDMONPIDDIR + [ -n "${RUNAS}" ] && chown "${RUNAS}:" "$COLLECTDMONPIDDIR" fi check_config() { @@ -50,7 +50,7 @@ start () { echo $"not starting due to configuration error" failure $"not starting $service due to configuration error" else - daemon --user "${RUNAS-root}" $prog -P $COLLECTDMONPID -c $COLLECTD -- -C "$CONFIG" $ARGS + daemon --user "${RUNAS:-root}" $prog -P $COLLECTDMONPID -c $COLLECTD -- -C "$CONFIG" $ARGS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$service -- 2.30.2