File tree 1 file changed +21
-8
lines changed
1 file changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,27 @@ MY_EMAIL_ADDRESS="
[email protected] " # REPLACE - used for Let's Encrypt
31
31
APPSEC_TOKEN=cp-67c2... # REPLACE WITH REAL TOKEN from Infinity Portal - Docker simple MANAGED profile token
32
32
APPSEC_HOSTNAME=appsec1493.klaud.online # REPLACE
33
33
34
- # prepare/verify DNS
35
- VMPUBLICIP=$( curl -s ip.iol.cz/ip/)
36
- echo
37
- echo " Make sure DNS recort for $APPSEC_HOSTNAME points to $VMPUBLICIP "
38
- # verify
39
- sudo resolvectl flush-caches
40
- echo " $APPSEC_HOSTNAME points to $( dig +short $APPSEC_HOSTNAME ) "
41
-
34
+ # prepare DNS
35
+ function verifyDns {
36
+ sudo resolvectl flush-caches
37
+ VMPUBLICIP=$( curl -s ip.iol.cz/ip/)
38
+ DNSIP=$( dig +short $APPSEC_HOSTNAME )
39
+ echo " Checking that DNS recort for $APPSEC_HOSTNAME points to $VMPUBLICIP "
40
+ if [ " $VMPUBLICIP " == " $DNSIP " ]; then
41
+ echo " Success: DNS points to this VM."
42
+ else
43
+ if [ -z " $DNSIP " ]; then
44
+ echo " DNS record not defined"
45
+ else
46
+ echo " DNS record points to ***wrong*** IP: $DNSIP "
47
+ fi
48
+ echo " Failed: please setup DNS record for $APPSEC_HOSTNAME "
49
+ fi
50
+ }
51
+ # run (and rerun after DNS changes)
52
+ verifyDns
53
+
54
+ # ready to install
42
55
helm install appsec https://github.com/mkol5222/appsec-chart/releases/download/appsec-0.1.1/appsec-0.1.1.tgz --set cptoken=$APPSEC_TOKEN --set hostname=$APPSEC_HOSTNAME --set letsencrypt.email=$MY_EMAIL_ADDRESS
43
56
44
57
# monitor appsec and http-01 solver
You can’t perform that action at this time.
0 commit comments