You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed multiple domain issue with create_http_https_site_certbot.sh script
Fixed issue with create_http_https_site_path_cert.sh script creating blank .pem and .key files
Added prompt to delete .pem and .key files in delete_site.sh as well as warning that it does not delete Lets Encrypt certs
Fixed wording on request_cerbot_cert.sh script
Copy file name to clipboardExpand all lines: dirstructure/opt/aegis-waf/scripts/create_http_https_site_certbot_cert.sh
+42-7Lines changed: 42 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,33 @@ if [ ! -f "/usr/local/nginx/conf/ssl/dhparam.pem" ]; then
10
10
11
11
#GET INPUTS
12
12
read -p "Enter a site name: " SITE
13
-
read -p "Enter a domain(s) for the Site (Multiple domains must be separated by a space): " DOMAIN
13
+
read -p "Enter a PRIMARY ROOT domain for the Site without www. in front of it (Example: domain.tld OR host.domain.tld): " DOMAIN
14
+
read -p "Enter any additional sub-domains separated by a comma (Example: www.domain.tld). Leave blank and press enter if none: " SECDOMAIN
14
15
read -p "Enter a destination url including http(s):// (Example: http://www.domain.tld for HTTP Only or https://www.domain.tld for HTTPS) Do NOT include a Port Number: " DESTINATION
15
16
read -p "Enter a Destination Port Number for the Site (Example: 80 for http or 443 for https):" PORT
16
17
read -p "Enter SSL Protocols you wish to enable separated by a space (Example: TLSv1.1 TLSv1.2 TLSv1.3):" SSLPROTOCOLS
17
18
19
+
#IF SECDOMAIN IS EMPTY THEN SET ALLDOMAIN TO $DOMAIN IF NOT SET ALLDOMAIN TO $DOMAIN AND $SECDOMAIN (CERTBOT)
20
+
if [ -z"$SECDOMAIN" ]
21
+
then
22
+
ALLDOMAIN=$DOMAIN
23
+
24
+
else
25
+
ALLDOMAIN="$DOMAIN,$SECDOMAIN"
26
+
27
+
fi
28
+
29
+
#IF SECDOMAIN IS EMPTY THEN SET ALLDOMAINNGINX TO $DOMAIN IF NOT SET ALLDOMAINNGINX TO $DOMAIN AND $SECDOMAIN (NGINX)
30
+
if [ -z"$SECDOMAIN" ]
31
+
then
32
+
ALLDOMAINNGINX=$DOMAIN
33
+
34
+
else
35
+
ALLDOMAINNGINX="$DOMAIN$SECDOMAIN"
36
+
37
+
fi
38
+
39
+
18
40
#START CONFIGURATION
19
41
echo"Creating Nginx Logs Directory"
20
42
#CREATE NGINX LOGS DIRECTORY
@@ -96,7 +118,7 @@ fi
96
118
97
119
echo"Configuring Nginx HTTP Conf File Domain"
98
120
#REPLACE ALL INSTANCES OF THE-DOMAIN WITH DOMAIN VARIABLE ON NGINX CONFIG FILE
Copy file name to clipboardExpand all lines: dirstructure/opt/aegis-waf/scripts/delete_site.sh
+14-18Lines changed: 14 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
1
#!/bin/bash
2
2
3
+
echo"WARNING"| boxes -d stone -p a2v1
4
+
echo"This script will NOT delete any Lets Encrypt certificates."
5
+
echo"Lets encrypt certificates must be manually removed from their respective /etc/letsencrypt/live/domain.tld directories"
6
+
echo"This script will prompt you to delete ONLY manually entered certificate and key files"
7
+
3
8
#GET INPUTS
4
9
read -p "Enter a site name to permanently delete: " SITE
5
10
@@ -66,22 +71,13 @@ else
66
71
echo There was an error removing Modsecurity .conf file. Error was $?
67
72
fi
68
73
69
-
echo"Removing certificate .pem file"
70
-
#Remove certificate .pem file
71
-
/bin/rm -rf /usr/local/nginx/conf/ssl/${SITE}.pem
72
-
73
-
if [ $?-eq 0 ];then
74
-
echo Done
75
-
else
76
-
echo There was an error removing .pem file. Error was $?
77
-
fi
78
-
79
-
echo"Removing key .key file"
80
-
#Remove key .key file
81
-
/bin/rm -rf /usr/local/nginx/conf/ssl/${SITE}.key
74
+
whiletrue;do
75
+
read -p "Do you wish remove the SSL Certificate and Key Files? (Enter y or Y. Warning!! Entering y or Y will remove the certificate and key files which may break other sites that use those files)" yn
0 commit comments