{Ninja-Shell}
Home
Info
Upload
Command
View /etc/passwd
cPanel Reset Password
Filename: /var///lib//dpkg/info/mysql-apt-config.postinst
#!/bin/bash # Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. # # 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; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . /usr/share/debconf/confmodule create_temp_mysql_gpg_file () { cat <<EOF > $1 -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1 mQINBGG4urcBEACrbsRa7tSSyxSfFkB+KXSbNM9rxYqoB78u107skReefq4/+Y72 TpDvlDZLmdv/lK0IpLa3bnvsM9IE1trNLrfi+JES62kaQ6hePPgn2RqxyIirt2se Si3Z3n3jlEg+mSdhAvW+b+hFnqxo+TY0U+RBwDi4oO0YzHefkYPSmNPdlxRPQBMv 4GPTNfxERx6XvVSPcL1+jQ4R2cQFBryNhidBFIkoCOszjWhm+WnbURsLheBp757l qEyrpCufz77zlq2gEi+wtPHItfqsx3rzxSRqatztMGYZpNUHNBJkr13npZtGW+kd N/xu980QLZxN+bZ88pNoOuzD6dKcpMJ0LkdUmTx5z9ewiFiFbUDzZ7PECOm2g3ve Jrwr79CXDLE1+39Hr8rDM2kDhSr9tAlPTnHVDcaYIGgSNIBcYfLmt91133klHQHB IdWCNVtWJjq5YcLQJ9TxG9GQzgABPrm6NDd1t9j7w1L7uwBvMB1wgpirRTPVfnUS Cd+025PEF+wTcBhfnzLtFj5xD7mNsmDmeHkF/sDfNOfAzTE1v2wq0ndYU60xbL6/ yl/Nipyr7WiQjCG0m3WfkjjVDTfs7/DXUqHFDOu4WMF9v+oqwpJXmAeGh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1dhMOj0rYXv6laLGJ1FsW5eSke7ohBLcfBBTKnMCBohROHy2 E63Wggfsdn3UYzfqZ8cfbXetkXuLS/OM3MXbiNjg+ElYzjgWrkayu7yLakZx+mx6 sHPIJYm2hzkniMG29d5mGl7ZT9emP9b+CfqGUxoXJkjs0gnDl44bwGJ0dmIBu3aj VAaHODXyY/zdDMGjskfEYbNXCAY2FRZSE58tgTvPKD++Kd2KGplMU2EIFT7JYfKh HAB5DGMkx92HUMidsTSKHe+QnnnoFmu4gnmDU31i =Xqbo -----END PGP PUBLIC KEY BLOCK----- EOF chmod 400 $1 } remove_temp_mysql_gpg_file () { if [ -f "$1" ]; then rm -f $1 fi } save_settings() { set -e SERVER=0 TOOLS=1 PREVIEW=2 SIGNEDBY="[signed-by=/usr/share/keyrings/mysql-apt-config.gpg]" db_get mysql-apt-config/repo-distro && DISTRO=$RET db_get mysql-apt-config/repo-codename && PLATFORM=$RET db_get mysql-apt-config/repo-url && REPO_URL_BASE=$RET if [ ! "${DISTRO}" = "ubuntu" -a ! "${DISTRO}" = "debian" ]; then echo "Unsupported distribution ${DISTRO}" echo "To manually select package repository, please run dpkg-reconfigure mysql-apt-config" exit 0 fi REPO_URL="${REPO_URL_BASE}/${DISTRO}/" db_get mysql-apt-config/select-server && SELECT[${SERVER}]=$RET db_get mysql-apt-config/select-tools && SELECT[${TOOLS}]=$RET db_get mysql-apt-config/select-preview && SELECT[${PREVIEW}]=$RET DEB[${SERVER}]="" DEB[${TOOLS}]="" DEB[${PREVIEW}]="" DEB_SRC[${SERVER}]="" DEB_SRC[${TOOLS}]="" DEB_SRC[${PREVIEW}]="" if [ -z "${SELECT[${SERVER}]}" ] || [ "${SELECT[${SERVER}]}" = "${NULL}" ]; then DEB[${SERVER}]="# deb ${SIGNEDBY} ${REPO_URL} ${PLATFORM} mysql-5.7" DEB_SRC[${SERVER}]="# deb-src ${SIGNEDBY} ${REPO_URL} ${PLATFORM} mysql-5.7" else DEB[${SERVER}]="deb ${SIGNEDBY} ${REPO_URL} ${PLATFORM} ${SELECT[${SERVER}]}" DEB_SRC[${SERVER}]="deb-src ${SIGNEDBY} ${REPO_URL} ${PLATFORM} ${SELECT[${SERVER}]}" fi if [ "${SELECT[${TOOLS}]}" = "Enabled" ]; then DEB[${TOOLS}]="deb ${SIGNEDBY} ${REPO_URL} ${PLATFORM} mysql-tools" else DEB[${TOOLS}]="#deb ${SIGNEDBY} ${REPO_URL} ${PLATFORM} mysql-tools" fi if [ "${SELECT[${PREVIEW}]}" = "Enabled" ]; then DEB[${PREVIEW}]="deb ${SIGNEDBY} ${REPO_URL} ${PLATFORM} mysql-tools-preview" else DEB[${PREVIEW}]="#deb ${SIGNEDBY} ${REPO_URL} ${PLATFORM} mysql-tools-preview" fi cat <<EOF > /etc/apt/sources.list.d/mysql.list ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out entries below, but any other modifications may be lost. # Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications. deb ${SIGNEDBY} ${REPO_URL} ${PLATFORM} mysql-apt-config ${DEB[${SERVER}]} ${DEB[${TOOLS}]} ${DEB[${PREVIEW}]} ${DEB_SRC[${SERVER}]} EOF set +e } case "$1" in configure) GPG_FILE=`mktemp` create_temp_mysql_gpg_file $GPG_FILE cat $GPG_FILE | gpg -o /usr/share/keyrings/mysql-apt-config.gpg --dearmor remove_temp_mysql_gpg_file $GPG_FILE save_settings ;; reconfigure) save_settings ;; esac
./Ninja\.