fix: Added a simple check
This commit is contained in:
@@ -1,12 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cat >> /usr/local/apache2/conf/httpd.conf <<EOF
|
if [ $DOMAIN -a $EMAIL]; then
|
||||||
|
if [ ! -e /usr/local/apache2/.configured ]; then
|
||||||
|
cat >> /usr/local/apache2/conf/httpd.conf <<EOF
|
||||||
ServerName $DOMAIN
|
ServerName $DOMAIN
|
||||||
ServerAdmin $EMAIL
|
ServerAdmin $EMAIL
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName $DOMAIN
|
ServerName $DOMAIN
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
EOF
|
EOF
|
||||||
httpd -k start
|
httpd -k start
|
||||||
certbot --apache -n --keep -d $DOMAIN -m $EMAIL
|
certbot --apache -n --keep -d $DOMAIN -m $EMAIL
|
||||||
httpd -k stop
|
httpd -k stop
|
||||||
|
touch /usr/local/apache2/.configured
|
||||||
|
fi
|
||||||
|
fi
|
||||||
httpd-foreground
|
httpd-foreground
|
||||||
Reference in New Issue
Block a user