Updated methode of adding repo's
This commit is contained in:
@@ -1 +1 @@
|
|||||||
$PKGA ppa:ondrej/apache2 -y -n > $OUTPUT 2>&1
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=apache osrel=$shortdist bash
|
||||||
@@ -2,15 +2,15 @@
|
|||||||
# Prerequisite packages #
|
# Prerequisite packages #
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
|
|
||||||
$PKGI software-properties-common gnupg > $OUTPUT 2>&1
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=init osrel=$shortdist bash
|
||||||
|
|
||||||
##--------------##
|
##--------------##
|
||||||
# Repositories #
|
# Repositories #
|
||||||
##--------------##
|
##--------------##
|
||||||
|
|
||||||
$PKGA universe -y > $OUTPUT 2>&1
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=universe osrel=$shortdist bash
|
||||||
$PKGA ppa:ondrej/php -y -n > $OUTPUT 2>&1
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=php osrel=$shortdist bash
|
||||||
$PKGA ppa:certbot/certbot -y -n > $OUTPUT 2>&1
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=certbot osrel=$shortdist bash
|
||||||
|
|
||||||
|
|
||||||
##-------------##
|
##-------------##
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=nginx osrel=$shortdist bash
|
||||||
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=nginx osrel=$shortdist bash
|
||||||
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
|
|
||||||
|
|
||||||
#Disable PhpMyadmin and Backend cms
|
#Disable PhpMyadmin and Backend cms
|
||||||
disbackendcms=1
|
disbackendcms=1
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ fi
|
|||||||
##--------------------##
|
##--------------------##
|
||||||
|
|
||||||
msg " Preconfiguring"
|
msg " Preconfiguring"
|
||||||
$PKGI software-properties-common gnupg > $OUTPUT 2>&1
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=init osrel=$shortdist bash
|
||||||
$PKGM update
|
$PKGM update
|
||||||
$PKGM upgrade -y
|
$PKGM upgrade -y
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
$PKGA ppa:chris-lea/redis-server -y -n > $OUTPUT 2>&1
|
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=redis osrel=$shortdist bash
|
||||||
45
installer.sh
45
installer.sh
@@ -7,12 +7,12 @@
|
|||||||
sed -i -e 's/magenta/blue/g' /etc/newt/palette
|
sed -i -e 's/magenta/blue/g' /etc/newt/palette
|
||||||
|
|
||||||
if [ "$1" != "-l" ]; then
|
if [ "$1" != "-l" ]; then
|
||||||
PKGM="debconf-apt-progress -- apt"
|
APTMODE="debconf-apt-progress -- apt"
|
||||||
OUTPUT='/dev/null'
|
OUTPUT='/dev/null'
|
||||||
IMODE=n
|
IMODE=n
|
||||||
fi
|
fi
|
||||||
if [ "$1" = "-l" ]; then
|
if [ "$1" = "-l" ]; then
|
||||||
PKGM="apt"
|
APTMODE="apt"
|
||||||
OUTPUT='/dev/tty'
|
OUTPUT='/dev/tty'
|
||||||
IMODE=l
|
IMODE=l
|
||||||
fi
|
fi
|
||||||
@@ -32,8 +32,43 @@ PHPMyadmin=1 #Overwriten by cms's without php
|
|||||||
sqlver=8.0
|
sqlver=8.0
|
||||||
TestMode=0
|
TestMode=0
|
||||||
#PackageManager-config
|
#PackageManager-config
|
||||||
PKGA="add-apt-repository --no-update"
|
|
||||||
PKGI="${PKGM} install -y --no-install-recommends"
|
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"
|
||||||
|
shortdist=ubu1804
|
||||||
|
elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then
|
||||||
|
echo "Ubuntu 20.04 Detected"
|
||||||
|
PKGM="$APTMODE"
|
||||||
|
PKGI="${PKGM} install -y --no-install-recommends"
|
||||||
|
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.list"
|
||||||
|
shortdist=deb10
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then
|
||||||
|
echo "Centos 8 Detected"
|
||||||
|
PKGM="dnf"
|
||||||
|
PKGLIST="dnf.list"
|
||||||
|
shortdist=cent8
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "This os in not supported"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset dist_ver dist APTMODE
|
||||||
|
|
||||||
|
|
||||||
##-------------##
|
##-------------##
|
||||||
# Test-Vars #
|
# Test-Vars #
|
||||||
@@ -311,7 +346,7 @@ printf " " >>/tmp/apt.list
|
|||||||
|
|
||||||
mkdir -p /etc/ICTM/sites
|
mkdir -p /etc/ICTM/sites
|
||||||
echo "InstDate=$(date "+%d-%B-%Y")" >> /etc/ICTM/mainvar.list
|
echo "InstDate=$(date "+%d-%B-%Y")" >> /etc/ICTM/mainvar.list
|
||||||
for storeme in PKGM PKGA PKGI OUTPUT IMODE repo branch branchtype webserv phpver sqlver PHPMyadmin email hostname; do
|
for storeme in PKGM PKGI OUTPUT IMODE repo branch branchtype webserv phpver sqlver PHPMyadmin email hostname; do
|
||||||
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
|
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user