From 0b732b78e15392218b705400fb2b5da01f16e9bd Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Wed, 25 Jun 2025 21:42:09 -0400 Subject: [PATCH] Adjusting resetdb.sh to work in production --- mailleur.spec.in | 1 + support/resetdb.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mailleur.spec.in b/mailleur.spec.in index 9d81f44..b01b3e5 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -18,6 +18,7 @@ Source0 : %{name}-@@VERSION@@.tar.gz BuildRequires : postgresql Requires : bash +Requires : cpp Requires : dovecot Requires : openssl Requires : sed diff --git a/support/resetdb.sh b/support/resetdb.sh index 5c6e452..aadcd2d 100755 --- a/support/resetdb.sh +++ b/support/resetdb.sh @@ -18,7 +18,7 @@ if [ "$USER" != "$OWNER" ] ; then exit 1 fi #--------------------------------------------------------------- -if [ $# -ge 1 -a "$1" != "$DOIT" ] ; then +if [ $# -eq 0 -o $# -ge 1 -a "$1" != "$DOIT" ] ; then echo "" echo "-----------" echo "ATTENTION! you are requesting a FULL database RESET" @@ -27,7 +27,7 @@ if [ $# -ge 1 -a "$1" != "$DOIT" ] ; then echo "-----------" sleep $DELAY fi -if [ $1 == $DOIT ] ; then +if [ -n "$1" -a "$1" == "$DOIT" ] ; then shift; fi CONF=/etc/$APPLICATION/$APPLICATION.conf -- 2.47.3