Fixed - getting public ip

master
Thomas Brinkmann 4 years ago
parent 370b8fd853
commit 6216eb5d5e
  1. 15
      lamp-headless.sh

@ -54,13 +54,13 @@ install_Debian9(){
show_spinner $!
echo -e "\n\e[92mDownloading PHPMyAdmin..\e[39m"
wget -N "https://files.phpmyadmin.net/phpMyAdmin/$PHPMYADMINV/phpMyAdmin-$PHPMYADMINV-all-languages.zip" >/dev/null &
wget -q -N "https://files.phpmyadmin.net/phpMyAdmin/$PHPMYADMINV/phpMyAdmin-$PHPMYADMINV-all-languages.zip" >/dev/null &
show_spinner $!
unzip -o phpMyAdmin-$PHPMYADMINV-all-languages.zip >/dev/null &
show_spinner $!
mv phpMyAdmin-$PHPMYADMINV-all-languages /usr/share/phpmyadmin
chmod -R 0755 /usr/share/phpmyadmin
wget -N "https://backup.mirror3.deinserverhost.icu/OneClick/phpmyadmin.conf"
wget -q -N "https://backup.mirror3.deinserverhost.icu/OneClick/phpmyadmin.conf"
mv phpmyadmin.conf /etc/apache2/conf-available/
a2enconf phpmyadmin
systemctl reload apache2
@ -69,28 +69,23 @@ install_Debian9(){
echo -e "\n\e[92mConfiguring MariaDB...\e[39m"
echo "CREATE USER '$DBUSER'@'localhost' IDENTIFIED BY '$DBPASS';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO '$DBUSER'@'localhost';
FLUSH PRIVILEGES;" > /home/LAMP.sql
mysql -u root < /home/LAMP.sql
rm /home/LAMP.sql
service apache2 restart
OWNIP=curl ifconfig.me
OWNIP=`curl ifconfig.me`
echo -e "\n\e[92mWriting login details into file...\e[39m"
echo -e "\n
########## Phpmyadmin ##########\n
# http://$OWNIP/phpmyadmin/
# Username: admin \n
# Password: $ADMINPASS \n
########## ## END ## ##########\n
\n
########## MySQL ##########\n
# Username: $DBUSER \n
# Password: $DBPASS \n
########## END ##########\n" > /home/LAMP-Login-Details-README.txt
########## ## END ## ##########\n
\n" > /home/LAMP-Login-Details-README.txt
echo -e "\n\e[92mLogin details written to \e[93m/home/LAMP-Login-Details-README.txt \e[39m"
}

Loading…
Cancel
Save