From: Jean-Marc Pigeon (Delson) Date: Thu, 26 Jun 2025 01:42:09 +0000 (-0400) Subject: Adjusting resetdb.sh to work in production X-Git-Tag: tag-0.10~26 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=0b732b78e15392218b705400fb2b5da01f16e9bd;p=jmp%2Fmailleur Adjusting resetdb.sh to work in production --- 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