Server IP : 127.0.0.2 / Your IP : 18.118.212.165 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/lib/dpkg/info/ |
Upload File : |
#!/bin/bash set -e # It is possible that Debconf has already been removed, too. if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } mysql_cfgdir=/etc/mysql MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" # To avoid having hardcoded paths in the script, we do a search on the path, as suggested at: # https://www.debian.org/doc/manuals/developers-reference/ch06.en.html#bpp-debian-maint-scripts pathfind() { OLDIFS="$IFS" IFS=: for p in $PATH; do if [ -x "$p/$*" ]; then IFS="$OLDIFS" return 0 fi done IFS="$OLDIFS" return 1 } # Try to stop the server in a sane way. If it does not success let the admin # do it himself. No database directories should be removed while the server # is running! stop_server() { set +e if pathfind invoke-rc.d; then invoke-rc.d mysql stop else /etc/init.d/mysql stop fi errno=$? set -e if [ "$?" != 0 ]; then echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2 echo "Stop it yourself and try again!" 1>&2 exit 1 fi } case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then stop_server sleep 2 fi ;; *) echo "postrm called with unknown argument '$1'" 1>&2 exit 1 ;; esac # New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql # variants in Ubuntu. case "$1" in remove|disappear) [ -x /usr/share/mysql-common/configure-symlinks ] && /usr/share/mysql-common/configure-symlinks remove mysql "$mysql_cfgdir/mysql.cnf" ;; esac # # - Do NOT purge logs or data if another mysql-sever* package is installed (#307473) # - Remove the mysql user only after all his owned files are purged. # if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then # we remove the mysql user only after all his owned files are purged rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz} rm -rf /var/log/mysql db_input high mysql-server-5.7/postrm_remove_databases || true db_go || true db_get mysql-server-5.7/postrm_remove_databases || true if [ "$RET" = "true" ]; then # never remove the debian.cnf when the databases are still existing # else we ran into big trouble on the next install! rm -f /etc/mysql/debian.cnf rm -rf /var/lib/mysql rm -rf /var/lib/mysql-files rm -rf /var/lib/mysql-keyring userdel mysql || true fi fi # Automatically added by dh_installinit if [ "$1" = "purge" ] ; then update-rc.d mysql remove >/dev/null fi # In case this system is running systemd, we make systemd reload the unit files # to pick up changes. if [ -d /run/systemd/system ] ; then systemctl --system daemon-reload >/dev/null || true fi # End automatically added section # Automatically added by dh_systemd_enable if [ "$1" = "remove" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper mask mysql.service >/dev/null fi fi if [ "$1" = "purge" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper purge mysql.service >/dev/null deb-systemd-helper unmask mysql.service >/dev/null fi fi # End automatically added section # Automatically added by dh_installdebconf if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge fi # End automatically added section # Automatically added by dh_apparmor if [ "$1" = "purge" ] && ! [ -e "/etc/apparmor.d/usr.sbin.mysqld" ] ; then rm -f "/etc/apparmor.d/disable/usr.sbin.mysqld" || true rm -f "/etc/apparmor.d/force-complain/usr.sbin.mysqld" || true rm -f "/etc/apparmor.d/local/usr.sbin.mysqld" || true rmdir /etc/apparmor.d/disable 2>/dev/null || true rmdir /etc/apparmor.d/local 2>/dev/null || true rmdir /etc/apparmor.d 2>/dev/null || true fi # End automatically added section exit 0