diff --git a/sh_scripts/geekbench_downloader.sh b/sh_scripts/sh/geekbench_downloader.sh similarity index 100% rename from sh_scripts/geekbench_downloader.sh rename to sh_scripts/sh/geekbench_downloader.sh diff --git a/sh_scripts/input.sh b/sh_scripts/sh/input.sh similarity index 100% rename from sh_scripts/input.sh rename to sh_scripts/sh/input.sh diff --git a/sh_scripts/lamp.sh b/sh_scripts/sh/lamp.sh similarity index 87% rename from sh_scripts/lamp.sh rename to sh_scripts/sh/lamp.sh index d6ec0d6..dcd875f 100644 --- a/sh_scripts/lamp.sh +++ b/sh_scripts/sh/lamp.sh @@ -1,6 +1,6 @@ #!/bin/bash # Make sure only root can run our script -VERSION="Version: 0.8v" +VERSION="Version: 1.0v" if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 @@ -22,12 +22,12 @@ echo "# #" echo "# #" echo "################################################" echo "" -echo "It will now install the following packages: dialog, expect, sharutils,gnupg1 & 2, Debian-Repos" +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://git.io/JYN1M') > /dev/null +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 -y +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 @@ -103,36 +103,32 @@ clear 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 - wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz - wget -P Downloads https://files.phpmyadmin.net/phpmyadmin.keyring - gpg --import ~/Downloads/phpmyadmin.keyring - wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.asc - gpg --verify ~/Downloads/phpMyAdmin-latest-all-languages.tar.gz.asc + 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 - sudo tar xvf ~/Downloads/phpMyAdmin-latest-all-languages.tar.gz --strip-components=1 -C /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" - rm -r /var/www/html/* 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 python-certbot-apache -y + 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 domainname - certbot --apache -d $domainname - exit 1 + 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 - if ["answer"="no"]; then - exit 1 - fi echo " Thank you for using this Script Your Webserver is available on http://$serviceIP/ and http://$serviceIP/phpmyadmin diff --git a/sh_scripts/mail_backup.sh b/sh_scripts/sh/mail_backup.sh similarity index 100% rename from sh_scripts/mail_backup.sh rename to sh_scripts/sh/mail_backup.sh diff --git a/sh_scripts/official_repo.sh b/sh_scripts/sh/official_repo.sh similarity index 100% rename from sh_scripts/official_repo.sh rename to sh_scripts/sh/official_repo.sh diff --git a/sh_scripts/password-generator.sh b/sh_scripts/sh/password-generator.sh similarity index 100% rename from sh_scripts/password-generator.sh rename to sh_scripts/sh/password-generator.sh diff --git a/sh_scripts/prometheus.sh b/sh_scripts/sh/prometheus.sh similarity index 100% rename from sh_scripts/prometheus.sh rename to sh_scripts/sh/prometheus.sh diff --git a/sh_scripts/python-quick-build.sh b/sh_scripts/sh/python-quick-build.sh similarity index 100% rename from sh_scripts/python-quick-build.sh rename to sh_scripts/sh/python-quick-build.sh diff --git a/sh_scripts/speedtest.sh b/sh_scripts/sh/speedtest.sh similarity index 100% rename from sh_scripts/speedtest.sh rename to sh_scripts/sh/speedtest.sh diff --git a/sh_scripts/spigot_autobild.sh b/sh_scripts/sh/spigot_builder.sh similarity index 100% rename from sh_scripts/spigot_autobild.sh rename to sh_scripts/sh/spigot_builder.sh diff --git a/sh_scripts/system_info.sh b/sh_scripts/sh/system_info.sh similarity index 100% rename from sh_scripts/system_info.sh rename to sh_scripts/sh/system_info.sh diff --git a/sh_scripts/ts3audiobot_installer.sh b/sh_scripts/sh/ts3audiobot_installer.sh similarity index 100% rename from sh_scripts/ts3audiobot_installer.sh rename to sh_scripts/sh/ts3audiobot_installer.sh diff --git a/sh_scripts/wg-access-server.sh b/sh_scripts/sh/wg-access-server.sh similarity index 100% rename from sh_scripts/wg-access-server.sh rename to sh_scripts/sh/wg-access-server.sh