From e58778180b99f0011bbb078bcd50efbc74ee36c0 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 25 Oct 2020 16:00:37 +0100 Subject: generalize function mkpw, and use xkcdpass (with gpw only as fallback) --- mailman/mklist.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mailman/mklist.inc b/mailman/mklist.inc index 956a4b2..12d319b 100644 --- a/mailman/mklist.inc +++ b/mailman/mklist.inc @@ -12,6 +12,10 @@ LISTWEBDOMAIN="$listwebdomain" OWNER="${owner:-listmaster@$MAILDOMAIN}" LISTLANG="${lang:-en}" +mkpw() { + xkcdpass --numwords 4 --delimiter - || gpw | head -n 1 +} + refreshlists() { existinglists="`/usr/sbin/list_lists -b`" } @@ -28,7 +32,7 @@ mklist() { urlhost="${4:-${LISTWEBDOMAIN:-$emailhost}}" if ! echo "$existinglists" | grep -q "^$list\$"; then - newlist -l "$lang"${urlhost:+ -u "$urlhost"}${emailhost:+ -e "$emailhost"} -q "$list" "$owner" "`gpw | head -n 1`" + newlist -l "$lang"${urlhost:+ -u "$urlhost"}${emailhost:+ -e "$emailhost"} -q "$list" "$owner" "$(mkpw)" fi LISTNAME="$list_anycase" LISTDESC="$desc" SENDERS="$senders" LISTOWNER="$owner" LISTHOST="$emailhost" "$sharedir/mklist.pl" "$skeldir/$type.$lang.py" > "$list.py" config_list -i "$cfgdir/$list.py" "$list" -- cgit v1.2.3