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