added new PackageManager-config
This commit is contained in:
@@ -15,13 +15,55 @@ phpmyadminver="5.0.2"
|
|||||||
SMI_config=no
|
SMI_config=no
|
||||||
|
|
||||||
#Enforcing Legacy Mode
|
#Enforcing Legacy Mode
|
||||||
PKGM="apt"
|
|
||||||
OUTPUT='/dev/tty'
|
OUTPUT='/dev/tty'
|
||||||
IMODE=l
|
IMODE=l
|
||||||
|
|
||||||
#Web-V2 Vars
|
#Web-V2 Vars
|
||||||
password=TestP@ssword123
|
password=TestP@ssword123
|
||||||
|
|
||||||
|
#PackageManager-config
|
||||||
|
|
||||||
|
dist_ver=$(grep --color=never -Po "^VERSION_ID=\K.*" "/etc/os-release")
|
||||||
|
dist=$(grep --color=never -Po "^ID=\K.*" "/etc/os-release")
|
||||||
|
|
||||||
|
if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then
|
||||||
|
echo "Ubuntu 18.04 Detected"
|
||||||
|
PKGM="$APTMODE"
|
||||||
|
PKGI="${PKGM} install -y --no-install-recommends"
|
||||||
|
PKGLIST="apt.pkg.list"
|
||||||
|
shortdist=ubu1804
|
||||||
|
elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then
|
||||||
|
echo "Ubuntu 20.04 Detected"
|
||||||
|
PKGM="$APTMODE"
|
||||||
|
PKGI="${PKGM} install -y --no-install-recommends"
|
||||||
|
PKGLIST="apt.pkg.list"
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
shortdist=ubu2004
|
||||||
|
elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||||
|
echo "Debian 10 Detected"
|
||||||
|
PKGM="$APTMODE"
|
||||||
|
PKGI="${PKGM} install -y --no-install-recommends"
|
||||||
|
PKGLIST="apt.pkg.list"
|
||||||
|
shortdist=deb10
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then
|
||||||
|
echo "Centos 8 Detected"
|
||||||
|
PKGM="dnf"
|
||||||
|
PKGI="${PKGM} install --setopt=install_weak_deps=False --best -y"
|
||||||
|
PKGLIST="dnf.pkg.list"
|
||||||
|
shortdist=cent8
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset dist_ver dist APTMODE
|
||||||
|
|
||||||
|
|
||||||
#Repo Vars
|
#Repo Vars
|
||||||
repo=https://git.ictmaatwerk.com/VPS-scripts/MySQL
|
repo=https://git.ictmaatwerk.com/VPS-scripts/MySQL
|
||||||
branch=master
|
branch=master
|
||||||
@@ -54,7 +96,7 @@ fi
|
|||||||
##--------------------------##
|
##--------------------------##
|
||||||
|
|
||||||
msg "Starting installer." 8 78
|
msg "Starting installer." 8 78
|
||||||
$PKGM update > $OUTPUT 2>&1
|
$PKGM update -y > $OUTPUT 2>&1
|
||||||
$PKGI curl > $OUTPUT 2>&1
|
$PKGI curl > $OUTPUT 2>&1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
46
mysql-8.0.sh
46
mysql-8.0.sh
@@ -8,10 +8,50 @@
|
|||||||
##-----------------##
|
##-----------------##
|
||||||
|
|
||||||
#Enforcing Legacy Mode
|
#Enforcing Legacy Mode
|
||||||
if [ -z ${PKGM+x} ]; then PKGM="apt" ; fi
|
|
||||||
if [ -z ${OUTPUT+x} ]; then OUTPUT='/dev/tty' ; fi
|
if [ -z ${OUTPUT+x} ]; then OUTPUT='/dev/tty' ; fi
|
||||||
if [ -z ${IMODE+x} ]; then IMODE=l ; fi
|
if [ -z ${IMODE+x} ]; then IMODE=l ; fi
|
||||||
|
|
||||||
|
#PackageManager-config
|
||||||
|
|
||||||
|
dist_ver=$(grep --color=never -Po "^VERSION_ID=\K.*" "/etc/os-release")
|
||||||
|
dist=$(grep --color=never -Po "^ID=\K.*" "/etc/os-release")
|
||||||
|
|
||||||
|
if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then
|
||||||
|
echo "Ubuntu 18.04 Detected"
|
||||||
|
PKGM="$APTMODE"
|
||||||
|
PKGI="${PKGM} install -y --no-install-recommends"
|
||||||
|
PKGLIST="apt.pkg.list"
|
||||||
|
shortdist=ubu1804
|
||||||
|
elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then
|
||||||
|
echo "Ubuntu 20.04 Detected"
|
||||||
|
PKGM="$APTMODE"
|
||||||
|
PKGI="${PKGM} install -y --no-install-recommends"
|
||||||
|
PKGLIST="apt.pkg.list"
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
shortdist=ubu2004
|
||||||
|
elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||||
|
echo "Debian 10 Detected"
|
||||||
|
PKGM="$APTMODE"
|
||||||
|
PKGI="${PKGM} install -y --no-install-recommends"
|
||||||
|
PKGLIST="apt.pkg.list"
|
||||||
|
shortdist=deb10
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then
|
||||||
|
echo "Centos 8 Detected"
|
||||||
|
PKGM="dnf"
|
||||||
|
PKGI="${PKGM} install --setopt=install_weak_deps=False --best -y"
|
||||||
|
PKGLIST="dnf.pkg.list"
|
||||||
|
shortdist=cent8
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset dist_ver dist APTMODE
|
||||||
|
|
||||||
|
|
||||||
#Repo Vars
|
#Repo Vars
|
||||||
@@ -40,7 +80,7 @@ echo "$1"
|
|||||||
##--------------------------##
|
##--------------------------##
|
||||||
|
|
||||||
msg "Starting installer." 8 78
|
msg "Starting installer." 8 78
|
||||||
$PKGM update > $OUTPUT 2>&1
|
$PKGM update -y > $OUTPUT 2>&1
|
||||||
$PKGI curl > $OUTPUT 2>&1
|
$PKGI curl > $OUTPUT 2>&1
|
||||||
|
|
||||||
|
|
||||||
@@ -59,7 +99,7 @@ fi
|
|||||||
|
|
||||||
msg "Preconfiguring."
|
msg "Preconfiguring."
|
||||||
$PKGI software-properties-common gnupg > $OUTPUT 2>&1
|
$PKGI software-properties-common gnupg > $OUTPUT 2>&1
|
||||||
$PKGM update
|
$PKGM update -y
|
||||||
$PKGM upgrade -y
|
$PKGM upgrade -y
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user