From 61fb7e26c79aead9075acf73a60d7d7eb9839ff2 Mon Sep 17 00:00:00 2001 From: tbergervoet Date: Fri, 5 Oct 2018 15:19:01 +0200 Subject: [PATCH] Update 'Apache-Installer.sh' --- Apache-Installer.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Apache-Installer.sh b/Apache-Installer.sh index fa64271..c36462e 100644 --- a/Apache-Installer.sh +++ b/Apache-Installer.sh @@ -23,7 +23,6 @@ chmod -R 755 /var/www apt install -y apache2 mysql-server-5.7 libapache2-mod-proxy-html # mysql_secure_installation automated mysqladmin -u root password "$password" -mysql -u root -p"$password" -e "UPDATE mysql.user SET Password=PASSWORD('$password') WHERE User='root'" mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User=''" mysql -u root -p"$password" -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'" @@ -112,8 +111,7 @@ newaliases # Netdata # ##-------------## -if [ $netdata = 1 ] - then +if [ $netdata = 1 ]; then apt install -y netdata sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/g' /etc/netdata/health_alarm_notify.conf ufw allow 19999/tcp @@ -126,8 +124,7 @@ fi # Memcached # ##---------------## -if [ $memcached = 1 ] - then +if [ $memcached = 1 ]; then apt install -y memcached # systemctl stop memcached # systemctl disable memcached @@ -137,8 +134,7 @@ fi # Redis # ##-----------## -if [ $redis = 1 ] - then +if [ $redis = 1 ]; then apt install -y redis-server sed -i 's/supervised no/supervised systemd/g' /etc/redis/redis.conf sed -i 's/# bind 127.0.0.1 ::1/bind 127.0.0.1 ::1/g' /etc/redis/redis.conf @@ -158,8 +154,7 @@ certbot --apache -n -d "$domain" -d "www.$domain" -m "$email" --hsts --redirect # Wordpress # ##---------------## -if [ $wordpress = 1 ] - then +if [ $wordpress = 1 ]; then db_name="wp_1" db_user="wp_1" db_pass=$(date +%s|sha256sum|base64|head -c 32)