]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Improving file mailleur-reset-db.sh
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Thu, 26 Jun 2025 08:08:25 +0000 (04:08 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Thu, 26 Jun 2025 08:08:25 +0000 (04:08 -0400)
support/mailleur-reset-db.sh [moved from support/resetdb.sh with 85% similarity]

similarity index 85%
rename from support/resetdb.sh
rename to support/mailleur-reset-db.sh
index aadcd2d880214a244cc2e9beeff7dc5368dcc390..3f5392f45a3313a21995164850e08df7c4addb7f 100755 (executable)
@@ -8,12 +8,12 @@ APPLICATION=mailleur
 DELAY=10
 DOIT=doit
 #---------------------------------------------------------------
-OWNER=`stat -c '%U' resetdb.sh`
+OWNER=`stat -c '%U' $0`
 USER=`id -nu`
 if [ "$USER" != "$OWNER" ] ; then
   echo ""
   echo "-----------"
-  echo "ATTENTION! $0 MUST BE executed by $0 owner, exiting"
+  echo "ATTENTION! $0 MUST BE executed by $0 file owner, exiting"
   echo "-----------"
   exit 1
   fi
@@ -21,7 +21,11 @@ if [ "$USER" != "$OWNER" ] ; then
 if [ $# -eq 0 -o $# -ge 1  -a  "$1" != "$DOIT" ]  ; then
   echo ""
   echo "-----------"
-  echo "ATTENTION! you are requesting a FULL database RESET"
+  echo "ATTENTION!:"
+  echo "- You are requesting a FULL database RESET."
+  echo "- You are requesting spool directory contents erasing."
+  echo ""
+  echo "all data, (DB contents, email, logs) will be GONE forever."
   echo "Are you sure!"
   echo "You have $DELAY seconds to cancel (CTRL-C)"
   echo "-----------"