1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-25 21:07:40 +00:00
freebsd-ports/mail/mailman/pkg-deinstall
Johann Visagie 4eb62bb3af - Add missing $CONFIGURE_ARGS. (Whoops again!)
- Actually install the images for Mailman's web front-end to
  ${PREFIX}/www/icons, instead of depending on the user to do this in a
  post-installation step.  Add a new build-time variable to control the
  location where these images are intstalled.
- Gratuitous change:  Change the GNU logo and link in the footer of most
  pages in Mailman's web front-end to a "Powered by FreeBSD" logo, and a link
  to the FreeBSD home page.  This was accomplished by:
  - Patching the source to allow for multiple footer bars based on a new
    configuration variable LOGO_OS.  If LOGO_OS is set to 'FreeBSD', the
    FreeBSD footer will be displayed; otherwise, it reverts to the default
    GNU footer.
  - Set LOGO_OS to 'FreeBSD' in the installed Defaults.py  (The user may
    override this in mm_cfg.py)
- Bump $PORTREVISION again.  (Sorry guys.)
2002-02-20 09:09:44 +00:00

50 lines
1.1 KiB
Bash

#! /bin/sh
delete_account() {
local u g home
u=$1
g=$2
echo -n "Removing group \"${g}\"... "
pw groupdel -n ${g}
echo "done."
echo -n "Removing user \"${u}\"... "
eval home=~${u}
echo 'y' | pw userdel -n ${u}
echo "done."
}
zero_crontab() {
local u
u=$1
echo -n 'Zeroing crontab(5) file belonging to user "%%USER%%"... '
crontab -u ${u} /dev/null || exit
echo 'done.'
echo '(The crontab(5) will be deleted completely when user "%%USER%%" is removed.)'
}
export PATH=/bin:/usr/bin:/usr/sbin
case $2 in
DEINSTALL)
zero_crontab %%USER%%
if ps -axwU %%USER%% | grep -q python; then
echo 'Killing all running processes belonging to user "%%USER%%".'
killall -u %%USER%% python
sleep 2
fi
;;
POST-DEINSTALL)
if [ -d %%MAILMANDIR%% ]; then
echo '%%MAILMANDIR%% is not empty - this installation may have active lists!'
echo '- The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.'
echo '- You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".'
else
delete_account %%USER%% %%GROUP%%
fi
;;
esac