From 49ce86f0c09ab2b3e1dca92d3f150c2e35d06e06 Mon Sep 17 00:00:00 2001 From: Chris Mague Date: Thu, 7 Jan 2016 11:01:36 -0800 Subject: [PATCH] fix USER and GROUP ordering in the init file to start the service --- scripts/init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index 91e9b47b3..74525bf48 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -106,7 +106,7 @@ piddir=`dirname $pidfile` if [ ! -d "$piddir" ]; then mkdir -p $piddir - chown $GROUP:$USER $piddir + chown $USER:$GROUP $piddir fi # Configuration file @@ -137,7 +137,7 @@ case $1 in log_success_msg "Starting the process" "$name" if which start-stop-daemon > /dev/null 2>&1; then - start-stop-daemon --chuid $GROUP:$USER --start --quiet --pidfile $pidfile --exec $daemon -- -pidfile $pidfile -config $config -configdirectory $confdir $TELEGRAF_OPTS >>$STDOUT 2>>$STDERR & + start-stop-daemon --chuid $USER:$GROUP --start --quiet --pidfile $pidfile --exec $daemon -- -pidfile $pidfile -config $config -configdirectory $confdir $TELEGRAF_OPTS >>$STDOUT 2>>$STDERR & else nohup $daemon -pidfile $pidfile -config $config -configdirectory $confdir $TELEGRAF_OPTS >>$STDOUT 2>>$STDERR & fi