diff options
author | Jonas Smedegaard <dr@jones.dk> | 2020-10-25 16:00:37 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2020-10-25 16:00:37 +0100 |
commit | e58778180b99f0011bbb078bcd50efbc74ee36c0 (patch) | |
tree | 90716ceb1e61085cd05c024b373384dae1b8d533 | |
parent | f9a2097bb2b880145d76f8aa4bbfbe207cab25cc (diff) |
generalize function mkpw, and use xkcdpass (with gpw only as fallback)
-rw-r--r-- | mailman/mklist.inc | 6 |
1 files changed, 5 insertions, 1 deletions
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" |