summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:29:20 +0200
committerdavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:29:20 +0200
commitc68950e5af550e495a3b66d0b9ef0e3bba01ab14 (patch)
tree868ad726db0aee41ea7a73dc3f9e12106592a9da
parent61d6cc9043451845ccca7a191ee4fc2a49b37f06 (diff)
Added silent mode.
-rwxr-xr-xbin/feature-install20
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/feature-install b/bin/feature-install
index b2fcd47..b8deac0 100755
--- a/bin/feature-install
+++ b/bin/feature-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 '$feature = { :uri => "http://localhost:8084/feature" }' >> $OT_DEFAULT_CONF; fi
-notify
+if [ $SILENT = false ]; then
+ notify
+fi
# return to wd
cd "$DIR"