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