#! /bin/bash # ---------------------------------------------------------------------------- # /var/install/deinstall/php8-cli - deinstall script # # Creation : 2021-10-15 schlotze # Last update: $Id: php8-cli 72416 2020-01-27 22:58:23Z schlotze $ # # Copyright (c) 2021 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=php8-cli # Set filelist filelist=/etc/filelist.d/${package_name}-files.txt # Check if this is an update if [ "${1}" = "--update" ] then update=true fi # --------------------------------------------------------------------------- # remove config and check file # remove config and check file # --------------------------------------------------------------------------- rm -f /etc/default.d/${package_name} rm -f /etc/check.d/${package_name} rm -f /etc/check.d/${package_name}.* # ---------------------------------------------------------------------------- # Stop deinstallation here, it's just an update # ---------------------------------------------------------------------------- if ${update:-false} then exit 0 fi # --------------------------------------------------------------------------- # remove config file # --------------------------------------------------------------------------- . /etc/config.d/${package_name} rm -f /etc/config.d/${package_name} rm -f /etc/backup.d/${package_name}.* # --------------------------------------------------------------------------- # remove menu # --------------------------------------------------------------------------- /var/install/bin/del-menu \ setup.services.menu \ setup.services.${package_name}.menu # --------------------------------------------------------------------------- # remove module php .ini files and apache2 module config # --------------------------------------------------------------------------- rm -f /etc/php8/cli/conf.d/eisfair.ini rm -f /etc/php8/cli/conf.d/mysql.ini rm -f /etc/php8/cli/conf.d/mysql-conf.ini rm -f /etc/php8/cli/conf.d/mssql.ini rm -f /etc/php8/cli/conf.d/interbase.ini rm -f /etc/php8/cli/conf.d/pgsql.ini rm -f /etc/php8/cli/conf.d/sqlite3.ini rm -f /etc/php8/cli/conf.d/ldap.ini rm -f /etc/php8/cli/conf.d/soap.ini rm -f /etc/php8/cli/conf.d/apcu.ini rm -f /etc/php8/cli/conf.d/redis.ini rm -f /etc/php8/cli/conf.d/advantage.ini rm -f /etc/php8/cli/conf.d/suhosin.ini rmdir --ignore-fail-on-non-empty /etc/php8/cli/conf.d 2>/dev/null rmdir --ignore-fail-on-non-empty /etc/php8/cli 2>/dev/null rmdir --ignore-fail-on-non-empty /etc/php8 2>/dev/null /usr/sbin/update-alternatives --remove php /usr/bin/php-8 exit 0 # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------