1 ## arg 1: the new package version
3 # Make sure the group and user "mailman" exists on this system and has the correct values
4 if grep -q "^mailman:" /etc/group &> /dev/null ; then
5 groupmod -g 80 -n mailman mailman &> /dev/null
7 groupadd -g 80 mailman &> /dev/null
10 if grep -q "^mailman:" /etc/passwd 2> /dev/null ; then
11 usermod -s /sbin/nologin -c "GNU Mailing List Manager" -d /usr/lib/mailman -u 80 -g mailman mailman &> /dev/null
13 useradd -s /sbin/nologin -c "GNU Mailing List Manager" -d /usr/lib/mailman -u 80 -g mailman -M -r mailman &> /dev/null
16 # check file permissions
17 # cd /usr/lib/mailman && bin/check_perms -f > /dev/null 2>&1 # -f applies fixes we should solve in the PKGBUILD
18 cd /usr/lib/mailman && bin/check_perms > /dev/null
20 echo ">>> Use '/usr/lib/mailman/bin/update -f' to convert lists created with unpatched mailman versions to the PGP/SMIME enabled format."
22 echo "Having a backup of the list configurations is very recommended."
25 ## arg 1: the new package version
26 ## arg 2: the old package version
31 ## arg 1: the old package version
33 userdel mailman &>/dev/null
34 groupdel mailman &>/dev/null || /bin/true