summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:36:58 +0200
committerdavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:36:58 +0200
commitcd1040e398526f8c2316e2f0890da4dab8cc76a0 (patch)
tree42b56dc1deda3f0da5b975977b4f51814c8d8616
parent0e8af4e48c57936f5021f6e87f84520550e8ea82 (diff)
Added silent mode.
-rwxr-xr-xbin/task-install20
1 files 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 (<Return> 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 (<Return> 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"