|
@ -16,8 +16,8 @@ |
|
|
function atexit() { |
|
|
function atexit() { |
|
|
#closes CLI session |
|
|
#closes CLI session |
|
|
cli-shell-api teardownSession |
|
|
cli-shell-api teardownSession |
|
|
_debug EXITCODE: $1 |
|
|
|
|
|
return $1 |
|
|
|
|
|
|
|
|
_debug EXITCODE: "$1" |
|
|
|
|
|
return "$1" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -28,7 +28,6 @@ edgemax_deploy() { |
|
|
_ccert="$3" |
|
|
_ccert="$3" |
|
|
_cca="$4" |
|
|
_cca="$4" |
|
|
_cfullchain="$5" |
|
|
_cfullchain="$5" |
|
|
|
|
|
|
|
|
### 'lighttpd_pem' - certificate file configured for your Edgemax GUI |
|
|
### 'lighttpd_pem' - certificate file configured for your Edgemax GUI |
|
|
|
|
|
|
|
|
lighttpd_pem=/config/auth/le-cert.pem |
|
|
lighttpd_pem=/config/auth/le-cert.pem |
|
@ -43,15 +42,16 @@ edgemax_deploy() { |
|
|
sudo sh -c "cat ${_ccert} ${_ckey} > ${lighttpd_pem}" |
|
|
sudo sh -c "cat ${_ccert} ${_ckey} > ${lighttpd_pem}" |
|
|
|
|
|
|
|
|
_info "$(__green "Checking EdgeMax Config for SSL Settings: $lighttpd_pem")" |
|
|
_info "$(__green "Checking EdgeMax Config for SSL Settings: $lighttpd_pem")" |
|
|
vals=$( cli-shell-api returnEffectiveValue service gui cert-file) |
|
|
|
|
|
|
|
|
vals=$(cli-shell-api returnEffectiveValue service gui cert-file) |
|
|
certfile=$vals |
|
|
certfile=$vals |
|
|
if [ "$lighttpd_pem" != "$certfile" ]; then |
|
|
if [ "$lighttpd_pem" != "$certfile" ]; then |
|
|
_debug "Current Edgemax Certfile" "$certfile" |
|
|
_debug "Current Edgemax Certfile" "$certfile" |
|
|
_info "Certfile is not set to $lighttpd_pem" |
|
|
_info "Certfile is not set to $lighttpd_pem" |
|
|
|
|
|
|
|
|
|
|
|
vyatta_sbindir="/opt/vyatta/sbin" #overwritten by eval command but needed to pass github checks. |
|
|
# Obtain session environment |
|
|
# Obtain session environment |
|
|
session_env=$(cli-shell-api getSessionEnv $PPID) |
|
|
session_env=$(cli-shell-api getSessionEnv $PPID) |
|
|
eval $session_env |
|
|
|
|
|
|
|
|
eval "$session_env" |
|
|
|
|
|
|
|
|
# Setup the session |
|
|
# Setup the session |
|
|
cli-shell-api setupSession |
|
|
cli-shell-api setupSession |
|
|