mirror of
https://github.com/MrUnknownDE/linux-script.git
synced 2026-04-09 18:03:49 +02:00
add #11
This commit is contained in:
@@ -22,8 +22,9 @@ 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
|
||||
bash <(wget -O - 'https://git.io/JYN1M')
|
||||
sudo apt update && apt install dialog expect sharutils -y
|
||||
GEN_PASS=$(
|
||||
for ((n=0;n<1;n++))
|
||||
@@ -68,11 +69,11 @@ HEIGHT=15
|
||||
WIDTH=70
|
||||
CHOICE_HEIGHT=5
|
||||
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:"
|
||||
|
||||
OPTIONS=(1 "No"
|
||||
2 "Yes"
|
||||
OPTIONS=(1 "Yes"
|
||||
2 "No"
|
||||
3 "Exit"
|
||||
4 "testing...")
|
||||
|
||||
@@ -86,7 +87,7 @@ CHOICE=$(dialog --clear \
|
||||
|
||||
clear
|
||||
case $CHOICE in
|
||||
1) # - No
|
||||
1) # - Yes
|
||||
echo "Lets Go!"
|
||||
echo "start installer" # - start the normal installer
|
||||
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 2: $MYSQL_MYSQLADMIN_GEN_PASSWORD"
|
||||
;;
|
||||
2) # - Yes
|
||||
HEIGHT=15
|
||||
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
|
||||
2) # - No
|
||||
echo "exit Installer!"
|
||||
;;
|
||||
3) # - Exit/Quit
|
||||
clear
|
||||
echo "exit Installer"
|
||||
echo "exit Installer!"
|
||||
;;
|
||||
*) # - Error
|
||||
echo "Error! Please report this bug on Github"
|
||||
|
||||
51
sh_scripts/wg-access-server.sh
Normal file
51
sh_scripts/wg-access-server.sh
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user