From cd1040e398526f8c2316e2f0890da4dab8cc76a0 Mon Sep 17 00:00:00 2001 From: davor Date: Tue, 11 Sep 2012 12:36:58 +0200 Subject: Added silent mode. --- bin/task-install | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bin/task-install b/bin/task-install index 1e21252..47c3b53 100755 --- a/bin/task-install +++ b/bin/task-install @@ -6,10 +6,20 @@ SELF=$(basename $0 -install) [ "`id -u`" = "0" ] && echo "This script must be run as non-root." 1>&2 && exit 1 -echo -echo "Welcome to service installation ( to continue)." -read delete_me +SILENT=false +if [ -n "$1" ] +then + if [ "$1" = "silent" ] + then + SILENT=true + fi +fi +if [ $SILENT = false ]; then + echo + echo "Welcome to service installation ( to continue)." + read delete_me +fi # check wd is root of service DIR=`pwd` @@ -55,7 +65,9 @@ if ! cat "$OT_CONFIG_DIR/config/$SELF.rb" | grep "four_store">/dev/null 2>&1; th if ! cat "$OT_CONFIG_DIR/config/$SELF.rb" | grep "aa">/dev/null 2>&1; then echo '$aa = { :uri => nil }' >> $OT_CONFIG_DIR/config/$SELF.rb; fi if ! cat "$OT_DEFAULT_CONF" | grep "$SELF">/dev/null 2>&1; then echo '$task = { :uri => "http://localhost:8086/task" }' >> $OT_DEFAULT_CONF; fi -notify +if [ $SILENT = false ]; then + notify +fi # return to wd cd "$DIR" -- cgit v1.2.3