Updated methode of adding repo's

This commit is contained in:
2020-09-24 12:13:05 +02:00
parent adbb03e62f
commit 9e9487c597
7 changed files with 49 additions and 16 deletions

View File

@@ -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

View File

@@ -2,15 +2,15 @@
# 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 #
##--------------##
$PKGA universe -y > $OUTPUT 2>&1
$PKGA ppa:ondrej/php -y -n > $OUTPUT 2>&1
$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=universe osrel=$shortdist bash
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
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
##-------------##

View File

@@ -1,2 +1 @@
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
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

View File

@@ -1,5 +1,4 @@
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
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
#Disable PhpMyadmin and Backend cms
disbackendcms=1

View File

@@ -84,7 +84,7 @@ fi
##--------------------##
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 upgrade -y

View File

@@ -1,3 +1,3 @@
#!/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

View File

@@ -7,12 +7,12 @@
sed -i -e 's/magenta/blue/g' /etc/newt/palette
if [ "$1" != "-l" ]; then
PKGM="debconf-apt-progress -- apt"
APTMODE="debconf-apt-progress -- apt"
OUTPUT='/dev/null'
IMODE=n
fi
if [ "$1" = "-l" ]; then
PKGM="apt"
APTMODE="apt"
OUTPUT='/dev/tty'
IMODE=l
fi
@@ -32,8 +32,43 @@ PHPMyadmin=1 #Overwriten by cms's without php
sqlver=8.0
TestMode=0
#PackageManager-config
PKGA="add-apt-repository --no-update"
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 #
@@ -311,7 +346,7 @@ printf " " >>/tmp/apt.list
mkdir -p /etc/ICTM/sites
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
done