From 9a30dadca398dedb84403f49029f204a78df8fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Tue, 8 Apr 2014 18:29:33 +0200 Subject: [PATCH] reinit-psql.sh: fix no arg check --- reinit-psql.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reinit-psql.sh b/reinit-psql.sh index 2587a192..83baeb81 100755 --- a/reinit-psql.sh +++ b/reinit-psql.sh @@ -8,7 +8,7 @@ if [ $# -gt 1 ]; then exit 1 fi -if [ $# ]; then +if [ $# -gt 0 ]; then if [ "$1" != "new" -a "$1" != "dl" ]; then echo $HELP exit 1 @@ -18,7 +18,7 @@ fi sudo -u postgres dropdb calebasse sudo -u postgres createdb calebasse -O $USER -if [ $# ]; then +if [ $# -gt 0 ]; then if [ $1 = "new" ]; then ssh calebasse.aps42.entrouvert.com ssh prod "/etc/cron.daily/calebasse_dumpdb" fi