mirror of
https://github.com/MrUnknownDE/linux-script.git
synced 2026-04-13 11:53:50 +02:00
edit dir
This commit is contained in:
29
sh_scripts/sh/geekbench_downloader.sh
Normal file
29
sh_scripts/sh/geekbench_downloader.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# Version: 0.1v #"
|
||||
echo "# #"
|
||||
echo "# Geekbench 5 #"
|
||||
echo "# Downloader #"
|
||||
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."
|
||||
sleep 1
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "LETS GO!"
|
||||
cd ~
|
||||
wget https://cdn.geekbench.com/Geekbench-5.4.0-Linux.tar.gz
|
||||
tar xf Geekbench-5.4.0-Linux.tar.gz
|
||||
echo "Finish, run with \"cd Geekbench-5.4.0-Linux/ && ./geekbench5"\"
|
||||
25
sh_scripts/sh/input.sh
Normal file
25
sh_scripts/sh/input.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# Make sure only root can run our script
|
||||
VERSION="Version: 0.1v"
|
||||
|
||||
clear
|
||||
echo "$VERSION"
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# (L)inux #"
|
||||
echo "# (A)pache #"
|
||||
echo "# (M)ysql #"
|
||||
echo "# (P)HP #"
|
||||
echo "# #"
|
||||
echo "# by #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "################################################"
|
||||
|
||||
|
||||
echo "Domain-Name [ENTER]:"
|
||||
|
||||
read domainname
|
||||
echo "This Domain is: $domainname"
|
||||
166
sh_scripts/sh/lamp.sh
Normal file
166
sh_scripts/sh/lamp.sh
Normal file
@@ -0,0 +1,166 @@
|
||||
#!/bin/bash
|
||||
# Make sure only root can run our script
|
||||
VERSION="Version: 1.0v"
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "This script must be run as root" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
clear
|
||||
echo "$VERSION"
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# (L)inux #"
|
||||
echo "# (A)pache #"
|
||||
echo "# (M)ysql #"
|
||||
echo "# (P)HP #"
|
||||
echo "# #"
|
||||
echo "# by #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "################################################"
|
||||
echo ""
|
||||
echo "It will now install the following packages: dialog, expect, sharutils,gnupg1 & 2, official_repo, unzip"
|
||||
sleep 2
|
||||
echo "Install Debian-Repos"
|
||||
bash <(wget -O - 'https://raw.githubusercontent.com/MrUnknownDE/linux-script/sh/official_repo.sh') > /dev/null
|
||||
echo "ok."
|
||||
sudo apt update && apt install dialog expect sharutils gnupg gnupg2 gnupg1 unzip zip -y
|
||||
GEN_PASS=$(
|
||||
for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PASS2=$(
|
||||
for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PASS3=$(
|
||||
for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
MYSQL_MYSQLADMIN_PASSWORD=$GEN_PASS
|
||||
MYSQL_ROOT_PASSWORD=$GEN_PASS2
|
||||
PHPMYADMIN_PASSPHRASE="$GEN_PASS3"
|
||||
|
||||
SECURE_MYSQL=$(expect -c "
|
||||
set timeout 10
|
||||
spawn mysql_secure_installation
|
||||
expect \"Enter current password for root (enter for none):\"
|
||||
send \"\r\"
|
||||
expect \"Change the root password?\"
|
||||
send \"y\r\"
|
||||
expect \"New password:\"
|
||||
send \"$MYSQL_ROOT_PASSWORD\r"
|
||||
expect \"Re-enter new password:\"
|
||||
send \"$MYSQL_ROOT_PASSWORD\r"
|
||||
expect \"Remove anonymous users?\"
|
||||
send \"y\r\"
|
||||
expect \"Disallow root login remotely?\"
|
||||
send \"y\r\"
|
||||
expect \"Remove test database and access to it?\"
|
||||
send \"y\r\"
|
||||
expect \"Reload privilege tables now?\"
|
||||
send \"y\r\"
|
||||
expect eof
|
||||
")
|
||||
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
|
||||
WIDTH=70
|
||||
CHOICE_HEIGHT=5
|
||||
BACKTITLE="(L)inux(A)apache(M)ysql(P)HP Installer - $VERSION"
|
||||
TITLE="Are you ready for the installation? "
|
||||
MENU="Choose one of the following options:"
|
||||
|
||||
OPTIONS=(1 "Yes"
|
||||
2 "No"
|
||||
3 "Exit"
|
||||
4 "testing...")
|
||||
|
||||
CHOICE=$(dialog --clear \
|
||||
--backtitle "$BACKTITLE" \
|
||||
--title "$TITLE" \
|
||||
--menu "$MENU" \
|
||||
$HEIGHT $WIDTH $CHOICE_HEIGHT \
|
||||
"${OPTIONS[@]}" \
|
||||
2>&1 >/dev/tty)
|
||||
|
||||
clear
|
||||
case $CHOICE in
|
||||
1) # - Yes
|
||||
echo "Lets Go!"
|
||||
echo "start installer" # - start the normal installer
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
sudo apt install wget apache2 apache2-utils mariadb-server mariadb-client lsb-release ca-certificates apt-transport-https software-properties-common -y
|
||||
echo "$SECURE_MYSQL"
|
||||
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
|
||||
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
|
||||
apt update
|
||||
sudo apt install php php-cgi php-mysql php-pear php-mbstring php-gettext libapache2-mod-php php-common php-phpseclib php-mysql php8.0-bcmath php8.0-curl-dbgsym php8.0-gmp-dbgsym php8.0-mysql php8.0-pspell-dbgsym php8.0-tidy php8.0-bcmath-dbgsym php8.0-dba php8.0-imap php8.0-mysql-dbgsym php8.0-readline php8.0-tidy-dbgsym php8.0-bz2 php8.0-dba-dbgsym php8.0-imap-dbgsym php8.0-odbc php8.0-readline-dbgsym php8.0-xdebug php8.0-bz2-dbgsym php8.0-dev php8.0-interbase php8.0-odbc-dbgsym php8.0-snmp php8.0-xml php8.0-cgi php8.0-enchant php8.0-interbase-dbgsym php8.0-opcache php8.0-snmp-dbgsym php8.0-xml-dbgsym php8.0-cgi-dbgsym php8.0-enchant-dbgsym php8.0-intl php8.0-opcache-dbgsym php8.0-soap php8.0-xsl php8.0-cli php8.0-fpm php8.0-intl-dbgsym php8.0-pgsql php8.0-soap-dbgsym php8.0-zip php8.0-cli-dbgsym php8.0-fpm-dbgsym php8.0-ldap php8.0-pgsql-dbgsym php8.0-sqlite3 php8.0-zip-dbgsym php8.0-common php8.0-gd php8.0-ldap-dbgsym php8.0-phpdbg php8.0-sqlite3-dbgsym php8.0-common-dbgsym php8.0-gd-dbgsym php8.0-mbstring php8.0-phpdbg-dbgsym php8.0-sybase php8.0-curl php8.0-gmp php8.0-mbstring-dbgsym php8.0-pspell php8.0-sybase-dbgsym -y
|
||||
rm -r /var/www/html/*
|
||||
wget https://files.phpmyadmin.net/phpMyAdmin/5.1.3/phpMyAdmin-5.1.3-all-languages.zip
|
||||
mkdir /var/www/html/phpmyadmin
|
||||
unzip phpMyAdmin-5.1.3-all-languages.zip
|
||||
mv phpMyAdmin-5.1.3-all-languages/* /var/www/html/phpmyadmin
|
||||
sudo chown -R 33:33 /var/www/html/phpmyadmin
|
||||
rm /var/www/html/phpmyadmin/config.inc.php
|
||||
wget https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/res/phpmyadmin-config.inc.php > /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 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 "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
|
||||
#clear
|
||||
echo "Do you want to have a domain certified by Let's Encrypt? (yes/no)" && read answer;
|
||||
if [ $answer == "yes" ]; then
|
||||
apt install certbot python3-certbot-apache -y
|
||||
certbot register
|
||||
echo "Domain Name:" && read domain;
|
||||
certbot --apache -d ${domain}
|
||||
crontab -l > letsencrypt.cron
|
||||
echo "40 3 * * 0 letsencrypt renew >> /var/log/letsencrypt-renew.log && /etc/init.d/apache2 restart" > letsencrypt.cron
|
||||
crontab letsencrypt.cron
|
||||
rm letsencrypt.cron
|
||||
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)
|
||||
echo "DB Root Passwort: $MYSQL_ROOT_PASSWORD"
|
||||
echo "DB Root GEN PASSWORT:$MYSQL_ROOT_GEN_PASSWORD"
|
||||
echo "DB Root GEN PASSWORT 2:$MYSQL_ROOT_GEN_PASSWORD"
|
||||
echo "DB Admin Passwort: $MYSQL_MYSQLADMIN_GEN_PASSWORD"
|
||||
echo "DB Admin Passwort 2: $MYSQL_MYSQLADMIN_GEN_PASSWORD"
|
||||
;;
|
||||
2) # - No
|
||||
echo "exit Installer!"
|
||||
;;
|
||||
3) # - Exit/Quit
|
||||
clear
|
||||
echo "exit Installer!"
|
||||
;;
|
||||
*) # - Error
|
||||
echo "Error! Please report this bug on Github"
|
||||
echo "https://github.com/MrUnknownDE/linux-script/issues/new"
|
||||
;;
|
||||
esac
|
||||
10
sh_scripts/sh/mail_backup.sh
Normal file
10
sh_scripts/sh/mail_backup.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
echo "Version: 0.1"
|
||||
echo "Mailserver Backup (for Mailcow)"
|
||||
echo "for Hetzner StorageBox! (at a Moment)"
|
||||
|
||||
|
||||
|
||||
# MAILCOW_BACKUP_LOCATION=/opt/mailcow-dockerized/Backup /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all --delete-days 7
|
||||
sshpass -p 'password' rsync --progress -e 'ssh -p23 -o StrictHostKeyChecking=no' --recursive /opt/mailcow-dockerized/Backup/ uXXX-subXXX@uXXX.your-storagebox.de:./
|
||||
echo "Finish"
|
||||
68
sh_scripts/sh/official_repo.sh
Normal file
68
sh_scripts/sh/official_repo.sh
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/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."
|
||||
sleep 5
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "LETS GO!"
|
||||
|
||||
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
|
||||
48
sh_scripts/sh/password-generator.sh
Normal file
48
sh_scripts/sh/password-generator.sh
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env sh
|
||||
if [[ -f $(which uuencode 2>/dev/null) ]]
|
||||
then
|
||||
GEN_PW_SSH=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_SSH_KEY=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-128
|
||||
done)
|
||||
GEN_PW_FTP=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_MYSQL=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_MAIL=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
echo "SSH-Password: $GEN_PW_SSH"
|
||||
echo "SSH-KEY-Password: $GEN_PW_SSH_KEY"
|
||||
echo "FTP User Password: $GEN_PW_FTP"
|
||||
echo "MYSQL User Password: $GEN_PW_MYSQL"
|
||||
echo "e-Mail User Password: $GEN_PW_MAIL"
|
||||
else
|
||||
GEN_PW_SSH=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_SSH_KEY=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-128
|
||||
done)
|
||||
GEN_PW_FTP=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_MYSQL=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_MAIL=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
apt update && apt install sharutils
|
||||
echo "SSH-Password: $GEN_PW_SSH"
|
||||
echo "SSH-KEY-Password: $GEN_PW_SSH_KEY"
|
||||
echo "FTP User Password: $GEN_PW_FTP"
|
||||
echo "MYSQL User Password: $GEN_PW_MYSQL"
|
||||
echo "e-Mail User Password: $GEN_PW_MAIL"
|
||||
|
||||
fi
|
||||
|
||||
172
sh_scripts/sh/prometheus.sh
Normal file
172
sh_scripts/sh/prometheus.sh
Normal file
@@ -0,0 +1,172 @@
|
||||
#!/bin/bash
|
||||
serviceIP=$(ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# Version: 0.1v #"
|
||||
echo "# #"
|
||||
echo "# Prometheus + Grafana #"
|
||||
echo "# Quick Installer #"
|
||||
echo "# #"
|
||||
echo "# by #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "################################################"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "DE >"
|
||||
echo "Dieses Script startet gleich automatisch. Es installiert Prometheus + Node_Exporter automatisch, so das du es dann bei Grafana gleich einbinden kannst."
|
||||
echo ""
|
||||
echo "EN >"
|
||||
echo "This script will start automatically. It installs Prometheus + Node_Exporter automatically, so that you can integrate it into Grafana right away."
|
||||
sleep 5
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "LETS GO!"
|
||||
|
||||
sudo groupadd --system prometheus
|
||||
sudo useradd -s /sbin/nologin --system -g prometheus prometheus
|
||||
sudo mkdir /var/lib/prometheus
|
||||
for i in rules rules.d files_sd; do sudo mkdir -p /etc/prometheus/${i}; done
|
||||
|
||||
sudo apt-get -y install wget
|
||||
mkdir -p /tmp/prometheus && cd /tmp/prometheus
|
||||
curl -s "https://api.github.com/repos/prometheus/prometheus/releases/latest" \
|
||||
| grep browser_download_url \
|
||||
| grep linux-amd64 \
|
||||
| cut -d '"' -f 4 \
|
||||
| wget -qi -
|
||||
|
||||
tar xvf prometheus*.tar.gz
|
||||
cd prometheus*/
|
||||
sudo mv prometheus promtool /usr/local/bin/
|
||||
sudo mv prometheus.yml /etc/prometheus/prometheus.yml
|
||||
sudo echo "
|
||||
# my global config
|
||||
global:
|
||||
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
|
||||
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
|
||||
# scrape_timeout is set to the global default (10s).
|
||||
|
||||
# Alertmanager configuration
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets:
|
||||
# - alertmanager:9093
|
||||
|
||||
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
|
||||
rule_files:
|
||||
# - "first_rules.yml"
|
||||
# - "second_rules.yml"
|
||||
|
||||
# A scrape configuration containing exactly one endpoint to scrape:
|
||||
# Here it's Prometheus itself.
|
||||
scrape_configs:
|
||||
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
|
||||
- job_name: 'prometheus'
|
||||
|
||||
# metrics_path defaults to '/metrics'
|
||||
# scheme defaults to 'http'.
|
||||
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
- job_name: 'node_exporter'
|
||||
static_configs:
|
||||
- targets: ['localhost:9100']" > /etc/prometheus/prometheus.yml
|
||||
|
||||
sudo echo "
|
||||
[Unit]
|
||||
Description=Prometheus
|
||||
Documentation=https://prometheus.io/docs/introduction/overview/
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=prometheus
|
||||
Group=prometheus
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
ExecStart=/usr/local/bin/prometheus \
|
||||
--config.file=/etc/prometheus/prometheus.yml \
|
||||
--storage.tsdb.path=/var/lib/prometheus \
|
||||
--web.console.templates=/etc/prometheus/consoles \
|
||||
--web.console.libraries=/etc/prometheus/console_libraries \
|
||||
--web.listen-address=0.0.0.0:9090 \
|
||||
--web.external-url=
|
||||
|
||||
SyslogIdentifier=prometheus
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target" > /etc/systemd/system/prometheus.service
|
||||
for i in rules rules.d files_sd; do sudo chown -R prometheus:prometheus /etc/prometheus/${i}; done
|
||||
for i in rules rules.d files_sd; do sudo chmod -R 775 /etc/prometheus/${i}; done
|
||||
sudo chown -R prometheus:prometheus /var/lib/prometheus/
|
||||
|
||||
echo "Install Node_Exporter"
|
||||
curl -s "https://api.github.com/repos/prometheus/node_exporter/releases/latest" \
|
||||
| grep browser_download_url \
|
||||
| grep linux-amd64 \
|
||||
| cut -d '"' -f 4 \
|
||||
| wget -qi -
|
||||
|
||||
tar -xvf node_exporter*.tar.gz
|
||||
cd node_exporter*/
|
||||
sudo cp node_exporter /usr/local/bin
|
||||
|
||||
sudo echo "
|
||||
[Unit]
|
||||
Description=Node Exporter
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
User=prometheus
|
||||
ExecStart=/usr/local/bin/node_exporter
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target" > /etc/systemd/system/node_exporter.service
|
||||
|
||||
|
||||
sudo apt install -y apt-transport-https
|
||||
sudo apt install -y software-properties-common wget
|
||||
wget -q -O - "https://packages.grafana.com/gpg.key" | sudo apt-key add -
|
||||
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
|
||||
sudo apt update
|
||||
sudo apt install grafana -y
|
||||
|
||||
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable grafana-server.service
|
||||
sudo systemctl enable node_exporter
|
||||
sudo systemctl enable prometheus
|
||||
sudo systemctl start node_exporter
|
||||
sudo systemctl start prometheus
|
||||
sudo systemctl start grafana-server
|
||||
|
||||
|
||||
|
||||
|
||||
echo "###############################################################################"
|
||||
echo ""
|
||||
echo "DE >"
|
||||
echo "Wenn alles geklappt hat, funktioniert Prometheus und Node_Exporter wunderbar!"
|
||||
echo "Beides kannst du unter"
|
||||
echo "http://$serviceIP:9090/"
|
||||
echo "http://$serviceIP:9100/"
|
||||
echo "http://$serviceIP:3000/"
|
||||
echo "erreichen"
|
||||
echo ""
|
||||
echo "EN >"
|
||||
echo "If everything went well, Prometheus and Node_Exporter will work wonderfully!"
|
||||
echo "You can access at"
|
||||
echo "http://$serviceIP:9090/"
|
||||
echo "http://$serviceIP:9100/"
|
||||
echo "http://$serviceIP:3000/"
|
||||
echo "to reach"
|
||||
echo ""
|
||||
echo "###############################################################################"
|
||||
50
sh_scripts/sh/python-quick-build.sh
Normal file
50
sh_scripts/sh/python-quick-build.sh
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
CPUCORES=$(grep ^processor /proc/cpuinfo | wc -l)
|
||||
# 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: 1.1v "
|
||||
clear
|
||||
echo "$VERSION"
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# Python3.9.2 #"
|
||||
echo "# Quick Build #"
|
||||
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."
|
||||
sleep 5
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "LETS GO!"
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y upgrade
|
||||
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev -y
|
||||
wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz
|
||||
tar -xf Python-3.9.9.tgz
|
||||
cd Python-3.9.9
|
||||
./configure --enable-optimizations
|
||||
make -j $CPUCORES
|
||||
sudo make altinstall
|
||||
echo ""
|
||||
echo "########################################"
|
||||
echo ""
|
||||
echo "Python3.9 is installed"
|
||||
echo "lets check this with: python3.9 --version"
|
||||
echo ""
|
||||
echo "########################################"
|
||||
66
sh_scripts/sh/speedtest.sh
Normal file
66
sh_scripts/sh/speedtest.sh
Normal file
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
SYSTEM=$(cat /etc/issue)
|
||||
# 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: 1.0v"
|
||||
clear
|
||||
echo "$VERSION"
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# Speedtest #"
|
||||
echo "# Installer #"
|
||||
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."
|
||||
sleep 5
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "LETS GO!"
|
||||
|
||||
case "$SYSTEM" in
|
||||
"Debian")
|
||||
sudo apt-get install curl
|
||||
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
|
||||
sudo apt-get install speedtest-cli
|
||||
echo "speedtest installer has end ..."
|
||||
;;
|
||||
"Ubuntu")
|
||||
sudo apt-get install curl
|
||||
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
|
||||
sudo apt-get install speedtest-cli
|
||||
echo "speedtest installer has end ..."
|
||||
;;
|
||||
"Kernel \r on an \m")
|
||||
curl -s https://install.speedtest.net/app/cli/install.rpm.sh | sudo bash
|
||||
sudo yum install speedtest
|
||||
;;
|
||||
*)
|
||||
clear
|
||||
echo "DE >"
|
||||
echo "Dein System wird zurzeit nicht unterstützt!"
|
||||
echo ""
|
||||
echo "Schreibe doch dazu ein Issue auf Github"
|
||||
echo "> https://github.com/MrUnknownDE/linux-script/issues/new"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "EN >"
|
||||
echo "Your system is currently not supported!"
|
||||
echo ""
|
||||
echo "Please write an issue on Github"
|
||||
echo "> https://github.com/MrUnknownDE/linux-script/issues/new"
|
||||
esac
|
||||
57
sh_scripts/sh/spigot_builder.sh
Normal file
57
sh_scripts/sh/spigot_builder.sh
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# Version: 0.1v #"
|
||||
echo "# #"
|
||||
echo "# Spigot Buildtool #"
|
||||
echo "# Autostart Script #"
|
||||
echo "# #"
|
||||
echo "# by #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "################################################"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "DE >"
|
||||
echo "Dieses Script startet gleich automatisch. Es holt die aktuellste Version vom \"BuildTool\" und startet dann gleich damit."
|
||||
echo ""
|
||||
echo "EN >"
|
||||
echo "This script starts automatically. It gets the latest version of the \"BuildTool\" and then starts with it"
|
||||
sleep 5
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
clear
|
||||
|
||||
FILE=BuildTool.jar
|
||||
if [ -f "$FILE" ]; then # Datei ist nicht vorhanden
|
||||
echo "Checking software packages ..."
|
||||
apt-get update
|
||||
apt-get install git default-jdk openjdk-17-jdk openjdk-17-jre -y
|
||||
clear
|
||||
echo "Checking software packages ..."
|
||||
echo -n "Which version should be built? (z.B. 1.18): "
|
||||
read;
|
||||
echo "start building Spigot-${REPLY} ..."
|
||||
sleep 2
|
||||
java -jar BuildTools.jar --rev ${REPLY}
|
||||
else # Datei ist nicht vorhanden
|
||||
echo "downloading BuildTools ..."
|
||||
rm BuildTools.jar
|
||||
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
|
||||
clear
|
||||
echo "downloading BuildTools ..."
|
||||
echo "Checking software packages ..."
|
||||
apt-get update
|
||||
apt-get install git default-jdk openjdk-17-jdk openjdk-17-jre -y
|
||||
clear
|
||||
echo "downloading BuildTools ..."
|
||||
echo "Checking software packages ..."
|
||||
echo -n "Which version should be built? (z.B. 1.18): "
|
||||
read;
|
||||
echo "start building Spigot-${REPLY} ..."
|
||||
sleep 2
|
||||
java -jar BuildTools.jar --rev ${REPLY}
|
||||
fi
|
||||
25
sh_scripts/sh/system_info.sh
Normal file
25
sh_scripts/sh/system_info.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# Version: 0.1v #"
|
||||
echo "# #"
|
||||
echo "# System_Info #"
|
||||
echo "# by #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "################################################"
|
||||
|
||||
|
||||
print_info() {
|
||||
info title
|
||||
info underline
|
||||
|
||||
info "OS" distro
|
||||
info "Host" model
|
||||
info "CPU" cpu
|
||||
info "Memory" memory
|
||||
info "Kernel" kernel
|
||||
info "Uptime" uptime
|
||||
info "Packages" packages
|
||||
info "Public IP" public_ip
|
||||
407
sh_scripts/sh/ts3audiobot_installer.sh
Normal file
407
sh_scripts/sh/ts3audiobot_installer.sh
Normal file
@@ -0,0 +1,407 @@
|
||||
#!/bin/bash
|
||||
# TS3AudioBot Installer
|
||||
# Init
|
||||
FILE="/tmp/out.$$"
|
||||
GREP="/bin/grep"
|
||||
|
||||
# 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.2v"
|
||||
|
||||
clear
|
||||
echo "$VERSION"
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# TS3AudioBot #"
|
||||
echo "# Installer #"
|
||||
echo "# #"
|
||||
echo "# by #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "################################################"
|
||||
|
||||
echo -n "Choose your System"
|
||||
echo ""
|
||||
|
||||
PS3='Please choose between 1-5:: '
|
||||
options=("Debian 11" "Debian 10" "Debian 9" "Ubuntu 20.04" "Ubuntu 18.04" "Quit")
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"Debian 11")
|
||||
echo "starting installer for Debian 11..."
|
||||
sleep 2
|
||||
echo "install system packages ..."
|
||||
apt-get install apt-transport-https pgp -y > /dev/null
|
||||
echo "install Microsoft repository ..."
|
||||
wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb
|
||||
rm packages-microsoft-prod.deb
|
||||
echo "starting installer for Debian 11..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
apt-get update && apt-get install dotnet-sdk-3.1 dotnet-sdk-6.0 -y > /dev/null
|
||||
clear
|
||||
echo "starting installer for Debian 11..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
apt-get install ffmpeg libopus-dev -y > /dev/null
|
||||
clear
|
||||
echo "starting installer for Debian 11..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
|
||||
sudo chmod a+rx /usr/local/bin/youtube-dl
|
||||
clear
|
||||
echo "starting installer for Debian 11..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
wget -O Bot.zip https://splamy.de/api/nightly/projects/ts3ab/develop/download
|
||||
apt-get install unzip -y && unzip Bot.zip -d Bot && cd Bot/
|
||||
clear
|
||||
echo "starting installer for Debian 11..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
echo "cleanup this install ..."
|
||||
sleep 5
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# Thank you for use #"
|
||||
echo "# this installer #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# run this Bot with #"
|
||||
echo "# > cd Bot/ #"
|
||||
echo "# > dotnet TS3AudioBot.dll #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "################################################"
|
||||
echo ""
|
||||
break
|
||||
;;
|
||||
"Debian 10")
|
||||
echo "starting installer for Debian 10 ..."
|
||||
sleep 2
|
||||
echo "install system packages ..."
|
||||
apt-get install apt-transport-https pgp -y > /dev/null
|
||||
echo "install Microsoft repository ..."
|
||||
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb
|
||||
rm packages-microsoft-prod.deb
|
||||
echo "starting installer for Debian 10 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
apt-get update && apt-get install dotnet-sdk-3.1 dotnet-sdk-6.0 -y > /dev/null
|
||||
clear
|
||||
echo "starting installer for Debian 10 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
apt-get install ffmpeg libopus-dev -y
|
||||
clear
|
||||
echo "starting installer for Debian 10 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
|
||||
sudo chmod a+rx /usr/local/bin/youtube-dl
|
||||
clear
|
||||
echo "starting installer for Debian 10 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
wget -O Bot.zip https://splamy.de/api/nightly/projects/ts3ab/develop/download
|
||||
apt-get install unzip -y && unzip Bot.zip -d Bot && cd Bot/
|
||||
clear
|
||||
echo "starting installer for Debian 10 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
echo "cleanup this install ..."
|
||||
sleep 5
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# Thank you for use #"
|
||||
echo "# this installer #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# run this Bot with #"
|
||||
echo "# > cd Bot/ #"
|
||||
echo "# > dotnet TS3AudioBot.dll #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "################################################"
|
||||
echo ""
|
||||
break
|
||||
;;
|
||||
"Debian 9")
|
||||
echo "starting installer for Debian 9 ..."
|
||||
sleep 2
|
||||
echo "install system packages ..."
|
||||
apt-get install apt-transport-https pgp -y > /dev/null
|
||||
echo "install Microsoft repository ..."
|
||||
wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
|
||||
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
|
||||
wget https://packages.microsoft.com/config/debian/9/prod.list
|
||||
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
|
||||
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
|
||||
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
|
||||
echo "starting installer for Debian 9 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
apt-get update && apt-get install dotnet-sdk-2.2 dotnet-sdk-3.1 dotnet-sdk-6.0 -y > /dev/null
|
||||
clear
|
||||
echo "starting installer for Debian 9 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
apt-get install ffmpeg libopus-dev -y
|
||||
clear
|
||||
echo "starting installer for Debian 9 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
|
||||
sudo chmod a+rx /usr/local/bin/youtube-dl
|
||||
clear
|
||||
echo "starting installer for Debian 9 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
wget -O Bot.zip https://splamy.de/api/nightly/projects/ts3ab/develop/download
|
||||
apt-get install unzip -y && unzip Bot.zip -d Bot && cd Bot/
|
||||
clear
|
||||
echo "starting installer for Debian 9 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
echo "cleanup this install ..."
|
||||
sleep 5
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# Thank you for use #"
|
||||
echo "# this installer #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# run this Bot with #"
|
||||
echo "# > cd Bot/ #"
|
||||
echo "# > dotnet TS3AudioBot.dll #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "################################################"
|
||||
echo ""
|
||||
break
|
||||
;;
|
||||
"Ubuntu 18.04")
|
||||
echo "starting installer for Ubuntu 18.04 ..."
|
||||
sleep 2
|
||||
echo "install system packages ..."
|
||||
sudo add-apt-repository universe
|
||||
sudo apt-get update
|
||||
sudo apt-get install apt-transport-https -y > /dev/null
|
||||
echo "install Microsoft repository ..."
|
||||
wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb -y > /dev/null
|
||||
echo "starting installer for Ubuntu 18.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
apt-get update && apt-get install dotnet-sdk-3.1 dotnet-sdk-6.0 -y > /dev/null
|
||||
clear
|
||||
echo "starting installer for Ubuntu 18.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
apt-get install ffmpeg libopus-dev -y
|
||||
clear
|
||||
echo "starting installer for Ubuntu 18.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
|
||||
sudo chmod a+rx /usr/local/bin/youtube-dl
|
||||
clear
|
||||
echo "starting installer for Ubuntu 18.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
wget -O Bot.zip https://splamy.de/api/nightly/projects/ts3ab/develop/download
|
||||
apt-get install unzip -y && unzip Bot.zip -d Bot && cd Bot/
|
||||
clear
|
||||
echo "starting installer for Ubuntu 18.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
echo "cleanup this install ..."
|
||||
sleep 5
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# Thank you for use #"
|
||||
echo "# this installer #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# run this Bot with #"
|
||||
echo "# > cd Bot/ #"
|
||||
echo "# > dotnet TS3AudioBot.dll #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "################################################"
|
||||
echo ""
|
||||
break
|
||||
;;
|
||||
"Ubuntu 20.04")
|
||||
echo "starting installer for Ubuntu 20.04 ..."
|
||||
sleep 2
|
||||
echo "install system packages ..."
|
||||
sudo add-apt-repository universe
|
||||
sudo apt-get update
|
||||
sudo apt-get install apt-transport-https pgp -y > /dev/null
|
||||
echo "install Microsoft repository ..."
|
||||
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb
|
||||
rm packages-microsoft-prod.deb
|
||||
echo "starting installer for Ubuntu 20.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
apt-get update && apt-get install dotnet-sdk-3.1 dotnet-sdk-6.0 -y > /dev/null
|
||||
clear
|
||||
echo "starting installer for Ubuntu 20.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
apt-get install ffmpeg libopus-dev -y
|
||||
clear
|
||||
echo "starting installer for Ubuntu 20.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
|
||||
sudo chmod a+rx /usr/local/bin/youtube-dl
|
||||
clear
|
||||
echo "starting installer for Ubuntu 20.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
wget -O Bot.zip https://splamy.de/api/nightly/projects/ts3ab/develop/download
|
||||
apt-get install unzip -y && unzip Bot.zip -d Bot && cd Bot/
|
||||
clear
|
||||
echo "starting installer for Ubuntu 20.04 ..."
|
||||
echo "install system packages ..."
|
||||
echo "install Microsoft repository ..."
|
||||
echo "install Microsoft DOTNET-6.0 ..."
|
||||
echo "install FFMPEG and Opus ..."
|
||||
echo "install youtube-dl ..."
|
||||
echo "install TS3AudioBot ..."
|
||||
echo "Folder: Bot"
|
||||
echo "cleanup this install ..."
|
||||
sleep 5
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# Thank you for use #"
|
||||
echo "# this installer #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# run this Bot with #"
|
||||
echo "# > cd Bot/ #"
|
||||
echo "# > dotnet TS3AudioBot.dll #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "################################################"
|
||||
echo ""
|
||||
break
|
||||
;;
|
||||
"Quit")
|
||||
break
|
||||
;;
|
||||
*) echo invalid option;;
|
||||
esac
|
||||
done
|
||||
51
sh_scripts/sh/wg-access-server.sh
Normal file
51
sh_scripts/sh/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