This commit is contained in:
2021-07-31 20:51:52 +02:00
parent 3fa7815337
commit 99ca38843f
2 changed files with 60 additions and 22 deletions

View File

@@ -22,8 +22,9 @@ echo "# #"
echo "# #" echo "# #"
echo "################################################" echo "################################################"
echo "" echo ""
echo "It will now install the following packages: dialog, expect, sharutils" echo "It will now install the following packages: dialog, expect, sharutils, Debian-Repos"
sleep 2 sleep 2
bash <(wget -O - 'https://git.io/JYN1M')
sudo apt update && apt install dialog expect sharutils -y sudo apt update && apt install dialog expect sharutils -y
GEN_PASS=$( GEN_PASS=$(
for ((n=0;n<1;n++)) for ((n=0;n<1;n++))
@@ -68,11 +69,11 @@ HEIGHT=15
WIDTH=70 WIDTH=70
CHOICE_HEIGHT=5 CHOICE_HEIGHT=5
BACKTITLE="(L)inux(A)apache(M)ysql(P)HP Installer - $VERSION" BACKTITLE="(L)inux(A)apache(M)ysql(P)HP Installer - $VERSION"
TITLE="Has LAMP ever been installed on this instance?" TITLE="Are you ready for the installation? "
MENU="Choose one of the following options:" MENU="Choose one of the following options:"
OPTIONS=(1 "No" OPTIONS=(1 "Yes"
2 "Yes" 2 "No"
3 "Exit" 3 "Exit"
4 "testing...") 4 "testing...")
@@ -86,7 +87,7 @@ CHOICE=$(dialog --clear \
clear clear
case $CHOICE in case $CHOICE in
1) # - No 1) # - Yes
echo "Lets Go!" echo "Lets Go!"
echo "start installer" # - start the normal installer echo "start installer" # - start the normal installer
sudo apt update sudo apt update
@@ -156,26 +157,12 @@ $cfg['SaveDir'] = '';" > /var/www/html/phpmyadmin/config.inc.php
echo "DB Admin Passwort: $MYSQL_MYSQLADMIN_GEN_PASSWORD" echo "DB Admin Passwort: $MYSQL_MYSQLADMIN_GEN_PASSWORD"
echo "DB Admin Passwort 2: $MYSQL_MYSQLADMIN_GEN_PASSWORD" echo "DB Admin Passwort 2: $MYSQL_MYSQLADMIN_GEN_PASSWORD"
;; ;;
2) # - Yes 2) # - No
HEIGHT=15 echo "exit Installer!"
WIDTH=70
CHOICE_HEIGHT=5
BACKTITLE="(L)inux(A)apache(M)ysql(P)HP Installer - $VERSION"
TITLE="Then please reinstall the server or uninstall the existing LAMP"
MENU="Choose one of the following options:"
OPTIONS=(1 "okey")
dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty
;; ;;
3) # - Exit/Quit 3) # - Exit/Quit
clear clear
echo "exit Installer" echo "exit Installer!"
;; ;;
*) # - Error *) # - Error
echo "Error! Please report this bug on Github" echo "Error! Please report this bug on Github"

View File

@@ -0,0 +1,51 @@
#!/bin/bash
# Wireguard-Access-Server
# Init
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
VERSION="Version: 0.1v"
clear
echo "$VERSION"
echo "################################################"
echo "# #"
echo "# #"
echo "# Wireguard #"
echo "# Installer #"
echo "# #"
echo "# by #"
echo "# johanneskr.de #"
echo "# #"
echo "# #"
echo "################################################"
# Docker Check
if ! which docker > /dev/null; then
echo -e "Docker is not install! Install? (y/n) \c"
read
if "$REPLY" = "y"; then
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
apt-get install docker-ce docker-ce-cli containerd.io
fi
if "$REPLY" = "n"; then
exit;
fi
fi
if ! which docker > /dev/null; then
echo -e "Docker Composer is not install! Install? (y/n) \c"
read
if "$REPLY" = "y"; then
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi
if "$REPLY" = "n"; then
exit;
fi
fi