summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:30:20 +0200
committerdavor <vorgrimmlerdavid@gmx.de>2012-09-11 12:30:20 +0200
commit5d2338313b5ff289ed7eee09f2b8dc6a3453b1b3 (patch)
tree47ba5a0a16e6cbcd4b8eb7fb479c46f8f78e93c5 /bin
parent5699010b993a84e6a885dd0c22403fe5221ab597 (diff)
Added silent mode.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/model-install20
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/model-install b/bin/model-install
index a566838..3d2ff32 100755
--- a/bin/model-install
+++ b/bin/model-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 '$model = { :uri => "http://localhost:8085/model" }' >> $OT_DEFAULT_CONF; fi
-notify
+if [ $SILENT = false ]; then
+ notify
+fi
# return to wd
cd "$DIR"