#! /bin/sh #---------------------------------------------------------------------------- # /var/install/deinstall.sh - deinstall Mailman # # Copyright (c) 2008 the eisfair team, team(at)eisfair(dot)org # # Creation: 26.07.2004 om # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib # set packages name packages_name=mailman # set filelist filelist=/etc/filelist.d/${packages_name}-files.txt # check for update is given if [ "${1}" = "update" ] then mecho -info "updating ${packages_name} (removing previous version)" update=1 else mecho -info "removing ${packages_name}" update=0 fi if [ -f /etc/init.d/mailman ] then /etc/init.d/mailman stop fi #---------------------------------------------------------------------------- # remove program files #---------------------------------------------------------------------------- while read id perm user group package file do case ${id} in b|u) # remove program files if [ "${file}" != "tmp/install.sh" -a "${file}" != "tmp/preinstall.sh" ] then rm -f /${file} fi ;; f) # remove directories rmdir --ignore-fail-on-non-empty /${file} ;; esac done < ${filelist} #---------------------------------------------------------------------------- # remove generated files #---------------------------------------------------------------------------- /var/install/bin/del-menu "/var/install/bin/setup.services.mailman" /var/install/menu/setup.services.menu rm -f /etc/config.d/mailman rm -f /etc/default.d/mailman rm -f /etc/check.d/mailman* exit 0 #---------------------------------------------------------------------------- # end #----------------------------------------------------------------------------