Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some QoL things #2

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Update fivem-nginx-proxy-install.sh
s1c-za authored Mar 26, 2024
commit a5e6cfb071999f05225822e631dfa49de02cbe9d
6 changes: 5 additions & 1 deletion fivem-nginx-proxy-install.sh
Original file line number Diff line number Diff line change
@@ -56,6 +56,10 @@ echo "Please enter the domain name of your server (Ex: play.myserver.com)"
read -p "Domain Name: " domain
echo "Do you want to auto-generate an SSL certificate? (y/n)"
read -p "Auto Generate SSL: " ssl
if [ "$ssl" == "y" ]; then
echo "Please specify your e-mail address to associate with the certificate"
read -p "Your Email: " cert
fi

# Install certbot for SSL (if needed)
if [ "$ssl" == "y" ]; then
@@ -80,7 +84,7 @@ sed -i "s/server_name_goes_here/$domain/g" /etc/nginx/web.conf
if [ "$ssl" == "y" ]; then
echo -e "\nGenerating SSL certificate..."
systemctl stop nginx
certbot certonly --nginx -d $domain --non-interactive --agree-tos --email youremail@example.com
certbot certonly --nginx -d $domain --non-interactive --agree-tos --email $cert
# Copy certificate files
cp /etc/letsencrypt/live/$domain/fullchain.pem /etc/nginx/ssl/fullchain.pem
cp /etc/letsencrypt/live/$domain/privkey.pem /etc/nginx/ssl/privkey.pem