mirror of
https://github.com/MrUnknownDE/linux-script.git
synced 2026-04-22 16:23:49 +02:00
LAST time, KneeNinetySeven,
/dev/urandom IS NOT a variable name generator...
This commit is contained in:
@@ -22,12 +22,9 @@ echo "# #"
|
|||||||
echo "# #"
|
echo "# #"
|
||||||
echo "################################################"
|
echo "################################################"
|
||||||
echo ""
|
echo ""
|
||||||
echo "It will now install the following packages: dialog, expect, sharutils,gnupg1 & 2, official_repo, unzip"
|
echo "It will now install the following packages: dialog, expect, sharutils,gnupg1 & 2, unzip, wget, curl"
|
||||||
sleep 2
|
sleep 2
|
||||||
echo "Install Debian-Repos"
|
sudo apt update && apt install dialog expect sharutils gnupg gnupg2 gnupg1 unzip zip wget curl -y
|
||||||
bash <(wget -O - 'https://raw.githubusercontent.com/MrUnknownDE/linux-script/official_repo_quick.sh') > /dev/null
|
|
||||||
echo "ok."
|
|
||||||
sudo apt update && apt install dialog expect sharutils gnupg gnupg2 gnupg1 unzip zip -y
|
|
||||||
GEN_PASS=$(
|
GEN_PASS=$(
|
||||||
for ((n=0;n<1;n++))
|
for ((n=0;n<1;n++))
|
||||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||||
@@ -66,8 +63,6 @@ send \"y\r\"
|
|||||||
expect eof
|
expect eof
|
||||||
")
|
")
|
||||||
serviceIP=$(ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
|
serviceIP=$(ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
|
||||||
row1=$(grep -n GEN_PASS /var/www/html/phpmyadmin/config.inc.php | sed 's/:.*//')
|
|
||||||
row0=$(($GEN_PASS))
|
|
||||||
|
|
||||||
|
|
||||||
HEIGHT=15
|
HEIGHT=15
|
||||||
@@ -109,14 +104,13 @@ clear
|
|||||||
unzip phpMyAdmin-5.1.3-all-languages.zip
|
unzip phpMyAdmin-5.1.3-all-languages.zip
|
||||||
mv phpMyAdmin-5.1.3-all-languages/* /var/www/html/phpmyadmin
|
mv phpMyAdmin-5.1.3-all-languages/* /var/www/html/phpmyadmin
|
||||||
curl https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/res/phpmyadmin-config.inc.php --output /var/www/html/phpmyadmin/config.inc.php
|
curl https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/res/phpmyadmin-config.inc.php --output /var/www/html/phpmyadmin/config.inc.php
|
||||||
sed "${row0},${row1}d" /var/www/html/phpmyadmin/config.inc.php
|
|
||||||
sudo chmod 660 /var/www/html/phpmyadmin/config.inc.php
|
sudo chmod 660 /var/www/html/phpmyadmin/config.inc.php
|
||||||
sudo chown -R 33:33 /var/www/html/phpmyadmin
|
sudo chown -R 33:33 /var/www/html/phpmyadmin
|
||||||
sudo systemctl restart apache2
|
sudo systemctl restart apache2
|
||||||
echo "CREATE USER 'mysqladmin'@'localhost' IDENTIFIED BY '$MYSQL_MYSQLADMIN_PASSWORD'; GRANT ALL PRIVILEGES ON *.* TO 'mysqladmin'@'localhost'; FLUSH PRIVILEGES;" | mysql -u root -password="$MYSQL_ROOT_PASSWORD"
|
echo "CREATE USER 'mysqladmin'@'localhost' IDENTIFIED BY '$MYSQL_MYSQLADMIN_PASSWORD'; GRANT ALL PRIVILEGES ON *.* TO 'mysqladmin'@'localhost'; FLUSH PRIVILEGES;" | mysql -u root -password="$MYSQL_ROOT_PASSWORD"
|
||||||
echo "GRANT ALL PRIVILEGES ON *.* TO 'mysqladmin'@'localhost';" | mysql -u root -password="$MYSQL_ROOT_PASSWORD"
|
echo "GRANT ALL PRIVILEGES ON *.* TO 'mysqladmin'@'localhost';" | mysql -u root -password="$MYSQL_ROOT_PASSWORD"
|
||||||
curl https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/res/lamp.html > /var/www/html/index.html
|
curl https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/res/lamp.html > /var/www/html/index.html
|
||||||
#clear
|
clear
|
||||||
echo "Do you want to have a domain certified by Let's Encrypt? (yes/no)" && read answer;
|
echo "Do you want to have a domain certified by Let's Encrypt? (yes/no)" && read answer;
|
||||||
if [ $answer == "yes" ]; then
|
if [ $answer == "yes" ]; then
|
||||||
apt install certbot python3-certbot-apache -y
|
apt install certbot python3-certbot-apache -y
|
||||||
@@ -127,22 +121,39 @@ clear
|
|||||||
echo "40 3 * * 0 letsencrypt renew >> /var/log/letsencrypt-renew.log && /etc/init.d/apache2 restart" > letsencrypt.cron
|
echo "40 3 * * 0 letsencrypt renew >> /var/log/letsencrypt-renew.log && /etc/init.d/apache2 restart" > letsencrypt.cron
|
||||||
crontab letsencrypt.cron
|
crontab letsencrypt.cron
|
||||||
rm letsencrypt.cron
|
rm letsencrypt.cron
|
||||||
|
clear
|
||||||
|
echo "
|
||||||
|
Thank you for using this Script
|
||||||
|
Your Webserver is available on http://${domain}/ and http://${domain}/phpmyadmin
|
||||||
|
|
||||||
|
MySQL-Login (localhost)
|
||||||
|
user: root
|
||||||
|
password: $MYSQL_ROOT_PASSWORD (Please change this password! It is static )
|
||||||
|
|
||||||
|
phpMyAdmin-Login
|
||||||
|
user: mysqladmin
|
||||||
|
password: $MYSQL_MYSQLADMIN_PASSWORD (Please change this password! It is static)
|
||||||
|
|
||||||
|
You want to improve my script or have a wish then open an issues on Github :)
|
||||||
|
>> https://github.com/MrUnknownDE/linux-script/issues/new" > installer-log.txt
|
||||||
|
cat installer-log.txt
|
||||||
|
else
|
||||||
|
echo "
|
||||||
|
Thank you for using this Script
|
||||||
|
Your Webserver is available on http://$serviceIP/ and http://$serviceIP/phpmyadmin
|
||||||
|
|
||||||
|
MySQL-Login (localhost)
|
||||||
|
user: root
|
||||||
|
password: $MYSQL_ROOT_PASSWORD (Please change this password! It is static )
|
||||||
|
|
||||||
|
phpMyAdmin-Login
|
||||||
|
user: mysqladmin
|
||||||
|
password: $MYSQL_MYSQLADMIN_PASSWORD (Please change this password! It is static)
|
||||||
|
|
||||||
|
You want to improve my script or have a wish then open an issues on Github :)
|
||||||
|
>> https://github.com/MrUnknownDE/linux-script/issues/new" > installer-log.txt
|
||||||
|
cat installer-log.txt
|
||||||
fi
|
fi
|
||||||
echo "
|
|
||||||
Thank you for using this Script
|
|
||||||
Your Webserver is available on http://$serviceIP/ and http://$serviceIP/phpmyadmin
|
|
||||||
|
|
||||||
MySQL-Login (localhost)
|
|
||||||
user: root
|
|
||||||
password: $MYSQL_ROOT_PASSWORD (Please change this password! It is static )
|
|
||||||
|
|
||||||
phpMyAdmin-Login
|
|
||||||
user: mysqladmin
|
|
||||||
password: $MYSQL_MYSQLADMIN_PASSWORD (Please change this password! It is static)
|
|
||||||
|
|
||||||
You want to improve my script or have a wish then open an issues on Github :)
|
|
||||||
>> https://github.com/MrUnknownDE/linux-script/issues/new" > installer-log.txt
|
|
||||||
cat installer-log.txt
|
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
echo "DB Root Passwort: $MYSQL_ROOT_PASSWORD"
|
echo "DB Root Passwort: $MYSQL_ROOT_PASSWORD"
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
SYSTEM=$(lsb_release -sr | cut -d. -f1)
|
|
||||||
# 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
|
|
||||||
clear
|
|
||||||
echo "################################################"
|
|
||||||
echo "# Version: 0.1v #"
|
|
||||||
echo "# #"
|
|
||||||
echo "# Linux #"
|
|
||||||
echo "# Automatically Repo edit #"
|
|
||||||
echo "# #"
|
|
||||||
echo "# by #"
|
|
||||||
echo "# johanneskr.de #"
|
|
||||||
echo "# #"
|
|
||||||
echo "# #"
|
|
||||||
echo "################################################"
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo "DE >"
|
|
||||||
echo "Dieses Script startet gleich automatisch."
|
|
||||||
echo ""
|
|
||||||
echo "EN >"
|
|
||||||
echo "This script will start automatically."
|
|
||||||
|
|
||||||
if [ "$SYSTEM" == "11" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/debian-11.txt" -o /etc/apt/sources.list
|
|
||||||
apt-get update && apt-get upgrade -y
|
|
||||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
|
||||||
echo "Have Fun with the Official Repos :)"
|
|
||||||
fi
|
|
||||||
if [ "$SYSTEM" == "10" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/debian-10.txt" -o /etc/apt/sources.list
|
|
||||||
apt-get update && apt-get upgrade -y
|
|
||||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
|
||||||
echo "Have Fun with the Official Repos :)"
|
|
||||||
fi
|
|
||||||
if [ "$OLD" == "9" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/debian-9.txt" -o /etc/apt/sources.list
|
|
||||||
apt-get update && apt-get upgrade -y
|
|
||||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
|
||||||
echo "Have Fun with the Official Repos :)"
|
|
||||||
fi
|
|
||||||
if [ "$SYSTEM" == "20" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/ubuntu-20.04.txt" -o /etc/apt/sources.list
|
|
||||||
apt-get update && apt-get upgrade -y
|
|
||||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
|
||||||
echo "Have Fun with the Official Repos :)"
|
|
||||||
fi
|
|
||||||
if [ "$SYSTEM" == "18" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/ubuntu-18.04.txt" -o /etc/apt/sources.list
|
|
||||||
apt-get update && apt-get upgrade -y
|
|
||||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
|
||||||
echo "Have Fun with the Official Repos :)"
|
|
||||||
fi
|
|
||||||
if [ "$SYSTEM" == "16" ]; then
|
|
||||||
curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/ubuntu-16.04.txt" -o /etc/apt/sources.list
|
|
||||||
apt-get update && apt-get upgrade -y
|
|
||||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
|
||||||
echo "Have Fun with the Official Repos :)"
|
|
||||||
fi
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
$cfg['blowfish_secret'] = 'GEN_PASS'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
|
$cfg['blowfish_secret'] = '3$tmLa#*vQ9Pv77C6^ng$wxLWpKdvaT2@!pWdqWx*5RBAz$t9LH8z5w@oER8Q!%Fgaoyyo8SwmkCn6UWrBkEXGT8fKCi&JcGNk3F%dN7FumKjjvqdJQJKc9hyb#Jihqo'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$i++;
|
$i++;
|
||||||
$cfg['Servers'][$i]['auth_type'] = 'cookie';
|
$cfg['Servers'][$i]['auth_type'] = 'cookie';
|
||||||
|
|||||||
Reference in New Issue
Block a user