#! /bin/sh #---------------------------------------------------------------------------- # apache2_php8 - Deinstallation # # Copyright (c) 2021 # Last Update: $Id: apache2_php8 62519 2019-01-21 22:14:22Z schlotze $ # # Copyright (c) 2009-2014 the eisfair team, team(at)eisfair(dot)org # # 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. #---------------------------------------------------------------------------- # set package name package_name=apache2_php8 # set filelist filelist=/etc/filelist.d/${package_name}-files.txt # check for update is given if [ "${1}" = "--update" ] then update=true 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} 2>/dev/null ;; esac done < ${filelist} # ---------------------------------------------------------------------------- # if update, then exit now # ---------------------------------------------------------------------------- if "${update:-false}" then exit fi # ---------------------------------------------------------------------------- # remove config file # ---------------------------------------------------------------------------- configfiles="/etc/config.d/${package_name} \ /etc/backup.d/${package_name}* \ /etc/check.d/${package_name}* \ /etc/default.d/${package_name}" for cfile in ${configfiles} do rm -f ${cfile} done #---------------------------------------------------------------------------- # remove files not listed in filelist #---------------------------------------------------------------------------- rm -f /etc/php8/apache2/conf.d/advantage.ini rm -f /etc/php8/apache2/conf.d/eac.ini rm -f /etc/php8/apache2/conf.d/eisfair.ini rm -f /etc/php8/apache2/conf.d/interbase.ini rm -f /etc/php8/apache2/conf.d/ldap.ini rm -f /etc/php8/apache2/conf.d/mssql.ini rm -f /etc/php8/apache2/conf.d/mysql.ini rm -f /etc/php8/apache2/conf.d/mysql-conf.ini rm -f /etc/php8/apache2/conf.d/pgsql.ini rm -f /etc/php8/apache2/conf.d/soap.ini rm -f /etc/php8/apache2/conf.d/sqlite3.ini rm -f /etc/php8/apache2/conf.d/suhosin.ini rm -f /etc/php8/apache2/suhosin.ini rm -f /etc/apache2/mods-available/libphp8.load rm -f /etc/apache2/mods-enabled/libphp8.load rm -f /etc/apache2/mods-available/libphp8.conf rm -f /etc/apache2/mods-enabled/libphp8.conf rmdir --ignore-fail-on-non-empty /etc/php8/apache2/conf.d 2>/dev/null rmdir --ignore-fail-on-non-empty /etc/php8/apache2 2>/dev/null rmdir --ignore-fail-on-non-empty /etc/php8 2>/dev/null # --------------------------------------------------------------------------- # check for installed and Apache Restart # --------------------------------------------------------------------------- if [ -f /var/install/packages/apache2 ] then /var/install/config.d/apache2.sh if [ -f /etc/config.d/apache2 ] then . /etc/config.d/apache2 fi if [ "$START_APACHE2" = "yes" ] then sleep 1 /usr/sbin/service stop apache2 sleep 2 /usr/sbin/service start apache2 fi fi exit 0 # --------------------------------------------------------------------------- # Ende von: apache2_php8 - Deinstallation # ---------------------------------------------------------------------------