Fixed bug with restoring self-gen-certs.

This commit is contained in:
Matias Barcenas 2018-04-23 04:38:00 -05:00
parent 3fe501138d
commit d9e4c48b71
1 changed files with 6 additions and 1 deletions

View File

@ -321,6 +321,11 @@ captive_portal_set_certificate() {
return 0
fi
# TODO: This is temporary solution, refactor this.
if [ "$CaptivePortalSSL" = "enabled" ]; then
local -r restoring=true
fi
captive_portal_unset_certificate
# Check existance of ssl certificate within fluxion with file size > 0
@ -341,7 +346,7 @@ captive_portal_set_certificate() {
# Check if we're restoring and we need to re-create certificate.
if [ "$CaptivePortalSSL" = "enabled" ]; then
if [ "$restoring" ]; then
if ! captive_portal_run_certificate_generator; then
fluxion_conditional_bail "cert-gen failed!"
return 2