#! /bin/bash # ---------------------------------------------------------------------------- # /var/install/deinstall/php7.3-fpm - deinstall script # # Creation : 2018-11-19 schlotze # Last update: $Id: php7.3-fpm 61987 2019-01-04 23:42:43Z schlotze $ # # Copyright (c) 2018 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=php7.3-fpm # Set filelist filelist=/etc/filelist.d/${package_name}-files.txt # Check if this is an update if [ "${1}" = "--update" ] then update=true fi # --------------------------------------------------------------------------- # stop service # --------------------------------------------------------------------------- if [ -f /etc/init.d/${package_name} ] then /etc/init.d/${package_name} stop fi # --------------------------------------------------------------------------- # remove start/stop scripts # --------------------------------------------------------------------------- rm -f /etc/rc2.d/{S,K}??${package_name} # --------------------------------------------------------------------------- # 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 module php .ini files and apache2 module config # --------------------------------------------------------------------------- rm -f /etc/apache2/mods-enabled/php7.3-fpm.conf rm -f /etc/php7.3/fpm/conf.d/eisfair.ini rm -f /etc/php7.3/fpm/conf.d/mysql.ini rm -f /etc/php7.3/fpm/conf.d/mysql-conf.ini rm -f /etc/php7.3/fpm/conf.d/mssql.ini rm -f /etc/php7.3/fpm/conf.d/interbase.ini rm -f /etc/php7.3/fpm/conf.d/pgsql.ini rm -f /etc/php7.3/fpm/conf.d/sqlite3.ini rm -f /etc/php7.3/fpm/conf.d/ldap.ini rm -f /etc/php7.3/fpm/conf.d/soap.ini rm -f /etc/php7.3/fpm/conf.d/apcu.ini rm -f /etc/php7.3/fpm/conf.d/redis.ini rm -f /etc/php7.3/fpm/conf.d/advantage.ini rm -f /etc/php7.3/fpm/conf.d/suhosin.ini rmdir --ignore-fail-on-non-empty /etc/php7.3/fpm/conf.d 2>/dev/null rmdir --ignore-fail-on-non-empty /etc/php7.3/fpm 2>/dev/null rmdir --ignore-fail-on-non-empty /etc/php7.3 2>/dev/null exit 0 # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------