Fixes for CentOS
This commit is contained in:
22
install.sh
22
install.sh
@@ -68,12 +68,20 @@ fi
|
||||
|
||||
read -p 'Soll Nginx mit Lets Encrypt eingerichtet werden? (Y/n)' ifle
|
||||
|
||||
if [ "$ifle" == "Y" ] || [ "$ifle" == "y" ]; then
|
||||
if [ "$ifle" == "Y" ] || [ "$ifle" == "y" || "$ifle" == "" ]; then
|
||||
git clone https://github.com/certbot/certbot.git /opt/certbot
|
||||
|
||||
if [ "$DIST" == "Fedora" || "$DIST" == "CentOS" ] || [ "$DIST" == "CentOS Linux" ]; then
|
||||
ln -s /opt/certbot/certbot-auto /usr/local/sbin/certbot
|
||||
ln -s /opt/certbot/certbot-auto /usr/local/sbin/letsencrypt
|
||||
cp make_cert /usr/local/sbin
|
||||
chmod +x /usr/local/sbin/make_cert
|
||||
else
|
||||
ln -s /opt/certbot/certbot-auto /usr/local/bin/certbot
|
||||
ln -s /opt/certbot/certbot-auto /usr/local/bin/letsencrypt
|
||||
cp make_cert /usr/local/bin
|
||||
chmod +x /usr/local/bin/make_cert
|
||||
fi
|
||||
crontab -l | { cat; echo "@weekly certbot renew --pre-hook 'systemctl stop nginx' --post-hook 'systemctl start nginx' --quiet"; } | crontab -
|
||||
fi
|
||||
|
||||
@@ -117,8 +125,14 @@ rm -rf /usr/local/nginx/nginx.conf
|
||||
cp nginx.conf /usr/local/nginx/
|
||||
mkdir -p /usr/local/nginx/snippets
|
||||
cp ssl-params.conf /usr/local/nginx/snippets/
|
||||
|
||||
if [ "$DIST" == "Fedora" || "$DIST" == "CentOS" ] || [ "$DIST" == "CentOS Linux" ]; then
|
||||
cp ngensite /usr/local/sbin
|
||||
chmod +x /usr/local/sbin/ngensite
|
||||
else
|
||||
cp ngensite /usr/local/bin
|
||||
chmod +x /usr/local/bin/ngensite
|
||||
fi
|
||||
|
||||
mkdir -p /var/log/nginx/
|
||||
|
||||
@@ -134,7 +148,11 @@ cd /usr/local/nginx
|
||||
mkdir sites-available
|
||||
mkdir sites-enabled
|
||||
|
||||
ln -s /usr/local/nginx /usr/local/bin/nginx
|
||||
if [ "$DIST" == "Fedora" || "$DIST" == "CentOS" ] || [ "$DIST" == "CentOS Linux" ]; then
|
||||
ln -s /usr/local/nginx/nginx /usr/local/sbin/nginx
|
||||
else
|
||||
ln -s /usr/local/nginx/nginx /usr/local/bin/nginx
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "----------------"
|
||||
|
||||
Reference in New Issue
Block a user