Skip to content

Commit

Permalink
update nginx_upgrade.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
afiniel committed Dec 1, 2022
1 parent bef5f7a commit 088d505
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 align="center"> Yiimpool Yiimp Install Scrypt v0.5.8 With DaemonBuilder and addport (update 2022-11-10) </h1>
<h1 align="center"> Yiimpool Yiimp Install Scrypt v0.5.8 With DaemonBuilder and addport (update 2022-12-01) </h1>

<a href="https://discord.gg/TTprjGD2tw"><img src="https://img.shields.io/discord/904564600354254898.svg?style=flat&label=Discord %3C3%20&color=7289DA%22" alt="Join Community Badge"/></a>
</p>
Expand Down
34 changes: 27 additions & 7 deletions yiimp_single/nginx_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,22 @@ if [[ ("$wireguard" == "true") ]]; then
source $STORAGE_ROOT/yiimp/.wireguard.conf
fi

# NGINX upgrade
# NGINX upgrade TODO: CLEAN UP
echo -e "$YELLOW => Upgrading NGINX <= $COL_RESET"

#Grab Nginx key and proper mainline package for distro
echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list >/dev/null 2>&1

sudo curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - >/dev/null 2>&1
# echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \
# | sudo tee /etc/apt/sources.list.d/nginx.list >/dev/null 2>&1
#
#sudo curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - >/dev/null 2>&1
hide_output sudo apt-get update
apt_install nginx

# Make additional conf directories, move and generate needed configurations.
sudo mkdir -p /etc/nginx/yiimpool
#sudo mkdir -p /etc/nginx/sites-available
#sudo mkdir -p /etc/nginx/sites-enabled

sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old
sudo cp -r nginx_confs/nginx.conf /etc/nginx/
sudo cp -r nginx_confs/general.conf /etc/nginx/yiimpool
Expand All @@ -52,11 +53,30 @@ sudo cp -r nginx_confs/letsencrypt.conf /etc/nginx/yiimpool

# Removing default nginx site configs.
sudo rm -r /etc/nginx/conf.d/default.conf
sudo rm -r /etc/nginx/sites-enabled/default*
sudo rm -r /etc/nginx/sites-available/default*
sudo rm -r /etc/nginx/sites-enabled/default
#sudo rm -r /etc/nginx/sites-available/default*

echo -e "$GREEN NGINX upgrade complete.$COL_RESET"
restart_service nginx
restart_service php7.3-fpm

# Installing PhpMyAdmin

echo -e "$CYAN => Installing phpMyAdmin $COL_RESET"
echo
sleep 3

echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections
echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections
echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections
echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections
echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections
echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections

#apt_install phpmyadmin
hide_output sudo apt-get install -y phpmyadmin

echo -e "$GREEN Done...$COL_RESET"
set +eu +o pipefail

cd $HOME/yiimp_install_script/yiimp_single

0 comments on commit 088d505

Please sign in to comment.