Files
Dave Horton c1b2667bca Distro/rhel (#81)
add support for RHEL 9 and 8
2023-10-30 13:55:34 -04:00

21 lines
398 B
Bash

#!/bin/bash
DISTRO=$1
echo "installing nginx"
if [[ "$DISTRO" == rhel* ]]; then
sudo dnf install -y nginx httpd-tools
cd /etc/nginx/conf.d
sudo mv /tmp/nginx.default default.conf
else
sudo apt-get install -y nginx apache2-utils
cd /etc/nginx/sites-available
sudo mv /tmp/nginx.default default
fi
sudo systemctl enable nginx
sudo systemctl restart nginx
sudo systemctl status nginx