Upload files to ''

This commit is contained in:
Bram Prieshof
2020-01-09 15:00:58 +01:00
parent 5015379c32
commit c0ec1bee84
5 changed files with 281 additions and 0 deletions

96
mysql-8.0.sh Normal file
View File

@@ -0,0 +1,96 @@
###########################
# MySQL 8.0 Installer #
###########################
##-----------------##
# Defining Vars #
##-----------------##
#Enforcing Legacy Mode
if [ -z ${PKGM+x} ]; then PKGM="apt" ; fi
if [ -z ${OUTPUT+x} ]; then OUTPUT='/dev/tty' ; fi
if [ -z ${IMODE+x} ]; then IMODE=l ; fi
#Repo Vars
mrepo=https://git.ictmaatwerk.com/VPS-scripts/MySQL
mbranch=master
###Select Module type
mtype=""$mrepo"/raw/branch/"$mbranch""
#SelfBuilding Vars
if [ -z ${PKGI+x} ]; then PKGI="${PKGM} install -y" ; fi
##---------------##
# Functions #
##---------------##
msg () {
echo "$1"
}
##--------------------------##
# Installer-Requirements #
##--------------------------##
msg "Starting installer." 8 78
$PKGM update > $OUTPUT 2>&1
$PKGI curl > $OUTPUT 2>&1
##-------------------------##
# Generating APT list #
##-------------------------##
#Webserver specific aptList
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$mtype"/apt.list; then
curl "$mtype"/apt.list >>/tmp/apt.list
fi
##--------------------##
# Pre-Requirements #
##--------------------##
msg "Preconfiguring."
$PKGI software-properties-common gnupg > $OUTPUT 2>&1
$PKGM update
$PKGM upgrade -y
##-------------------##
# Pre-configuring #
##-------------------##
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$mtype"/preconf.sh; then
source <(curl --retry 7 --retry-delay 5 -s "$mtype"/preconf.sh)
fi
##-------------##
# Installer #
##-------------##
$PKGM update
sed -i 's/PHPver/'$phpver'/g' /tmp/apt.list
cat /tmp/apt.list | xargs $PKGI
##---------------##
# Configuring #
##---------------##
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$mtype"/conf.sh; then
source <(curl --retry 7 --retry-delay 5 -s "$mtype"/conf.sh)
fi
##-------##
# end #
##-------##
msg "done"