Skip to content

Commit 20bd14f

Browse files
committed
wizard: fix letsencrypt empty email
Signed-off-by: nachoparker <nacho@ownyourbits.com>
1 parent 5a16d57 commit 20bd14f

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

bin/ncp-diag

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ echo "internet check|$( ping -W 2 -w 1 -q github.com &>/dev/null && echo ok || e
6464

6565
function is_port_open()
6666
{
67-
PORT=$1
68-
tmp_file=$(mktemp)
69-
v=$(wget -T2 -t1 -q --keep-session-cookies --save-cookies $tmp_file https://portchecker.co -O - | grep -oP "_csrf\" value=\"\K.*\"")
70-
wget -T2 -t1 -q --load-cookies $tmp_file https://portchecker.co --post-data "port=$PORT&_csrf=${v::-1}" -O - \
71-
| grep -q '<span class="green">open</span>' && { echo "open"; return 1; }
67+
local PORT=$1
68+
local tmp_file=$(mktemp)
69+
local v=$(wget -T2 -t1 -q --keep-session-cookies --save-cookies $tmp_file https://portchecker.co -O - | grep -oP "_csrf\" value=\"\K.*\"")
70+
if [[ "$v" != "" ]]; then
71+
wget -T2 -t1 -q --load-cookies $tmp_file https://portchecker.co --post-data "port=$PORT&_csrf=${v::-1}" -O - \
72+
| grep -q '<span class="green">open</span>' && { echo "open"; return 1; }
73+
fi
7274
echo "closed"
7375
rm $tmp_file
7476
}

bin/ncp/NETWORKING/letsencrypt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ configure()
6262
domain_string+=",${domain}"
6363
}
6464
done
65-
$letsencrypt certonly -n --force-renew --no-self-upgrade --webroot -w $ncdir --hsts --agree-tos -m $EMAIL -d $domain_string && {
65+
"${letsencrypt}" certonly -n --force-renew --no-self-upgrade --webroot -w "${ncdir}" --hsts --agree-tos -m "${EMAIL}" -d "${domain_string}" && {
6666

6767
# Set up auto-renewal
6868
cat > /etc/cron.weekly/letsencrypt-ncp <<EOF

bin/ncp/NETWORKING/no-ip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ install()
3737
### END INIT INFO
3838
EOF
3939

40-
cat debian.noip2.sh >> /etc/init.d/noip2
40+
cat debian.noip2.sh >> /etc/init.d/noip2
4141

4242
chmod +x /etc/init.d/noip2
4343
cd -

changelog.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11

2-
[v1.34.1](https://github.com/nextcloud/nextcloudpi/commit/37c2e4f) (2021-01-01) unattended-upgrades: fix raspbian origin
2+
[v1.33.2](https://github.com/nextcloud/nextcloudpi/commit/a975b0c) (2021-01-17) wizard: fix letsencrypt empty email
33

4-
[v1.34.0](https://github.com/nextcloud/nextcloudpi/commit/ec428a2) (2021-01-01) upgrade to NC20.0.4
5-
6-
[v1.33.2 ](https://github.com/nextcloud/nextcloudpi/commit/82d00c8) (2021-01-01) ncp-config: fix empty values
7-
8-
[v1.33.1 ](https://github.com/nextcloud/nextcloudpi/commit/42fd597) (2020-12-12) nc-update-nc: improve error messages
4+
[v1.33.1](https://github.com/nextcloud/nextcloudpi/commit/42fd597) (2020-12-12) nc-update-nc: improve error messages
95

106
[v1.33.0](https://github.com/nextcloud/nextcloudpi/commit/ffd0b44) (2020-12-10) upgrade to NC20.0.3
117

etc/ncp-config.d/no-ip.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"id": "TIME",
3535
"name": "Time",
3636
"value": "30",
37+
"default": "30",
3738
"suggest": "30"
3839
}
3940
]

ncp-web/wizard/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
</div>
173173
</div>
174174

175-
<!-- Configure No-IP -->
175+
<!-- Configure No-IP -->
176176
<div class="ncp-hidden" id="noip">
177177
<div class="buttons-area">
178178
<div class="ddns-form">
@@ -184,14 +184,14 @@
184184
</tr>
185185
<tr>
186186
<td><label for="noip-password">Password</label></td>
187-
<td><input type="text" id="noip-password" placeholder="secret"></td>
187+
<td><input type="password" id="noip-password" placeholder="secret"></td>
188188
</tr>
189189
</table>
190190
<div class="buttons-area">
191191
<button class="btn" id="ddns-enable-noip">Finish</button>
192192
</div>
193193
</form>
194-
</div>
194+
</div>
195195
</div>
196196
</div>
197197
</div>

ncp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ done
204204
ncc config:system:set trusted_domains 1 --value=$ip
205205
EOF
206206

207-
[[ "$DOCKERBUILD" != 1 ]] && systemctl enable nextcloud-domain
207+
[[ "$DOCKERBUILD" != 1 ]] && systemctl enable nextcloud-domain
208208

209209
# NEXTCLOUDPI UPDATES
210210
cat > /etc/cron.daily/ncp-check-version <<EOF

0 commit comments

Comments
 (0)