#! /bin/sh #------------------------------------------------------------------------------ # /var/install/deinstall/bcsrv - deinstall script # # Creation : 2007-02-01 jv # Last update: $Id$ # # Copyright (c) 2007 the eisfair team, c/o Frank Meyer, # # 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 packages_name='bcsrv' if [ "$1" = "update" ] then mecho -info "Updating BCSRV (removing previous version)" update=1 else mecho -info "Removing BCSRV" update=0 fi mysql_bc_user='bacula' ### ------------------------------------------------------------------------- ### remove start script and links ### ------------------------------------------------------------------------- /etc/init.d/${packages_name} stop rm -f /etc/init.d/${packages_name} rm -f /etc/rc2.d/S??${packages_name} rm -f /etc/rc2.d/K??${packages_name} ### ------------------------------------------------------------------------- ### remove default and check file ### ------------------------------------------------------------------------- rm -f /etc/default.d/${packages_name} rm -f /etc/check.d/${packages_name}* ### ------------------------------------------------------------------------- ### remove program files ### ------------------------------------------------------------------------- rm -rf /usr/local/bacula ### ------------------------------------------------------------------------- ### remove doc files ### ------------------------------------------------------------------------- rm -rf /usr/share/doc/${packages_name} ### ------------------------------------------------------------------------- ### remove all config files ### ------------------------------------------------------------------------- rm -f /etc/bacula-* ### ------------------------------------------------------------------------- ### remove all menu action files ### ------------------------------------------------------------------------- rm -f /var/install/bin/${packages_name}-* ### ------------------------------------------------------------------------- ### stop remove for update only ### ------------------------------------------------------------------------- if [ "$update" -eq 1 ] then exit 0 fi ### ------------------------------------------------------------------------- ### remove package from menu system / remove all menu and config files ### ------------------------------------------------------------------------- /var/install/bin/del-menu setup.services.menu setup.services.${packages_name}.menu rm -f /var/install/menu/setup.services.${packages_name}.* rm -f /var/install/packages/${packages_name} rm -f /var/install/help/${packages_name} ### ------------------------------------------------------------------------- ### remove config file ### ------------------------------------------------------------------------- rm -f /etc/config.d/${packages_name} rm -f /etc/backup.d/${packages_name}* rm -f /etc/filelist.d/${packages_name}-files.txt ### ------------------------------------------------------------------------- ### remove SQL data ### ------------------------------------------------------------------------- # rm -rf ${bacula_datadir}/db ### ------------------------------------------------------------------------- ### remove deinstall script ### ------------------------------------------------------------------------- rm -f /var/install/deinstall/${packages_name} ### ------------------------------------------------------------------------- exit 0