-
Notifications
You must be signed in to change notification settings - Fork 0
/
bncert-letsencrypt-mode.xml
93 lines (93 loc) · 5.53 KB
/
bncert-letsencrypt-mode.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<componentGroup>
<name>bncertletsencryptmode</name>
<show>0</show>
<componentList>
<!-- Include Lego -->
<component name="lego" selected="1" canBeEdited="0" show="0">
<folderList>
<folder name="lego" destination="${lego_dir}">
<distributionFileList>
<distributionFile origin="lego"/>
</distributionFileList>
<ruleList>
<!-- Never install, only extract when required -->
<isTrue value="0"/>
</ruleList>
</folder>
</folderList>
</component>
</componentList>
<preInstallationActionList>
<!-- Trim parameters to avoid whitespaces -->
<foreach values="email" variables="parameterToTrim">
<actionList>
<stringModify text="${${parameterToTrim}}" logic="trim" variable="${parameterToTrim}"/>
</actionList>
<ruleList>
<stringTest text="${${parameterToTrim}}" type="not_empty"/>
</ruleList>
</foreach>
</preInstallationActionList>
<parameterList>
<parameterGroup name="letsencrypt_configuration_group" title="Create a free HTTPS certificate with Let's Encrypt" explanation="Please provide a valid e-mail address for which to associate your Let's Encrypt certificate." insertAfter="changes_to_perform_group">
<parameterList>
<labelParameter name="domains_label" description="Domain list: ${all_domains}"/>
<labelParameter name="server_name_label" description="Server name: ${server_name}"/>
<!-- Parameters that the user will be able to configure -->
<stringParameter name="email" description="E-mail address"/>
<!-- Link parameter are properly shown in GUI mode, but in text mode it looks better if we ask -->
<linkParameter name="letsencrypt_tos_link" description="${letsencrypt_tos_url}" explanation="If you click Next, it means you agree to the Let's Encrypt Subscriber Agreement, which you can find at:">
<clickedActionList>
<launchBrowser url="${letsencrypt_tos_url}"/>
</clickedActionList>
<ruleList>
<isTrue value="${letsencrypt_agree_to_tos}"/>
<compareText text="${installer_ui}" logic="equals" value="gui"/>
</ruleList>
</linkParameter>
<booleanParameter name="letsencrypt_agree_to_tos" description="Do you agree to the Let's Encrypt Subscriber Agreement?" explanation="The Let's Encrypt Subscriber Agreement can be found at:

${letsencrypt_tos_url}" cliOptionText="Agree to the Let's Encrypt Subscriber Agreement" default="1">
<ruleEvaluationLogic>or</ruleEvaluationLogic>
<ruleList>
<isFalse value="${letsencrypt_agree_to_tos}"/>
<compareText text="${installer_ui}" logic="does_not_equal" value="gui"/>
</ruleList>
</booleanParameter>
</parameterList>
<validationActionList>
<!-- The users must agree with the Let's Encrypt TOS -->
<throwError text="You must agree to the Let's Encrypt Subscriber Agreement!">
<ruleList>
<isFalse value="${letsencrypt_agree_to_tos}"/>
</ruleList>
</throwError>
<!-- Validate email -->
<throwError text="Please enter a valid email">
<ruleEvaluationLogic>or</ruleEvaluationLogic>
<ruleList>
<stringTest type="empty" text="${email}"/>
<regExMatch pattern="^[a-z0-9.-_]+@[a-z0-9._-]+$" logic="does_not_match" text="${email}"/>
</ruleList>
</throwError>
</validationActionList>
<ruleList>
<compareText text="${action}" logic="equals" value="create_letsencrypt_certificate"/>
</ruleList>
</parameterGroup>
<!-- The parameters below are not shown to users -->
<!-- Metadata parameters (set during build-time or pre-install time) -->
<stringParameter name="bundled_lego_version" value="2.5.0" ask="0"/>
<stringParameter name="letsencrypt_tos_url" value="https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf" ask="0"/>
<!-- State parameters -->
<booleanParameter name="use_existing_letsencrypt_certificate" default="0" ask="0"/>
<booleanParameter name="revoke_existing_letsencrypt_certificate" default="0" ask="0"/>
<stringParameter name="existing_letsencrypt_certificate_crt" default="0" ask="0"/>
<stringParameter name="existing_letsencrypt_certificate_key" default="0" ask="0"/>
<!-- Modifiers -->
<booleanParameter name="configure_cron" description="Create a cron entry for renewing certificates each month" default="1" ask="0"/>
<!-- Parameters that reference to Lego paths -->
<directoryParameter name="lego_dir" value="${installdir}/letsencrypt" ask="0"/>
<directoryParameter name="lego_app_dir" value="${installdir}/apps/letsencrypt" ask="0"/>
<fileParameter name="lego_binary" value="${lego_dir}/lego" ask="0"/>
<directoryParameter name="certificates_dir" value="${lego_dir}/certificates" ask="0"/>
</parameterList>
</componentGroup>