From 5d528930832367ee537fc95f3e4c5c0e4ee61803 Mon Sep 17 00:00:00 2001
From: Patrick Cernko <pcernko@mpi-klsb.mpg.de>
Date: Tue, 5 Oct 2021 16:24:45 +0200
Subject: [PATCH] ensuring MMPW set

---
 mm2sympa.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/mm2sympa.sh b/mm2sympa.sh
index 4acf638..9e0241a 100755
--- a/mm2sympa.sh
+++ b/mm2sympa.sh
@@ -20,6 +20,11 @@ if [ ! -f "/etc/sympa/$robot/robot.conf" ]; then
     exit 1
 fi
 
+if [ -z "$MMPW" ]; then
+    echo "Please set MMPW to the listadmin password of $mmdomain!" >&2
+    exit 1
+fi
+
 function sshml() {
     ssh -o ControlPath="~/.ssh/cp-$MPI_ROOT-%C" -o ControlMaster=auto -o ControlPersist=600s $mmdomain -l root "$@"
 }
@@ -33,7 +38,7 @@ tmpdir=$(mktemp -t -d mm2sympa.${mailmanlist/@/AT}.XXXXXXXX)
 chmod go+rx $tmpdir
 trap "rm -rf $tmpdir" 0 1 2 5 15 EXIT
 
-set -x
+#set -x
 
 # create list based on mailman config
 inputpy=$tmpdir/input.py
-- 
GitLab