From 014356a786e82ad8da85a8cf0dba6b1035794436 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sat, 25 Oct 2014 04:54:36 +0300 Subject: [PATCH] Fill in template group. --- functest/test.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/functest/test.sh b/functest/test.sh index 333c45e0..921fa3f2 100755 --- a/functest/test.sh +++ b/functest/test.sh @@ -23,7 +23,21 @@ cp "stuff/OnDisconnect" "$STGPATH/" cp "stuff/OnChange" "$STGPATH/" cp -R "stuff/db-stub" "$STGPATH/db" -sed -i "s|-STG-PATH-|$STGPATH|g" "$STGPATH/stargazer.conf" +GROUP=root +groups | grep root > /dev/null 2> /dev/null +if [ "$?" != "0" ] +then + groups | grep wheel > /dev/null 2> /dev/null + if [ "$?" != "0" ] + then + printf "Can't find neither 'root' nor 'wheel' group.\n" + exit -1 + fi + GROUP=wheel +fi + +sed -i "" "s|-STG-PATH-|$STGPATH|g" "$STGPATH/stargazer.conf" +sed -i "" "s|-STG-GROUP-|$GROUP|g" "$STGPATH/stargazer.conf" CURPATH=`pwd` LOGFILE="$CURPATH/"`date "+%Y-%m-%d-%H%M%S.console.log"` -- 2.44.2