Browse Source

reverted bad merge

pull/5246/head^2
3VAbdAVE 3 months ago
parent
commit
adfafe5c54
  1. 21
      deploy/unifi.sh

21
deploy/unifi.sh

@ -15,16 +15,6 @@
# OS version ~3.1 removed java and keytool from the UnifiOS. # OS version ~3.1 removed java and keytool from the UnifiOS.
# Using PKCS12 format keystore appears to work fine. # Using PKCS12 format keystore appears to work fine.
# #
# See below regarding keytool. Not tested.
# - Unifi Dream Machine
# This has not been tested on other "all-in-one" devices such as
# UDM Pro or Unifi Express.
#
# OS Version v2.0.0+
# Network Application version 7.0.0+
# OS version ~3.1 removed java and keytool from the UnifiOS.
# Using PKCS12 format keystore appears to work fine.
#
# Please report bugs to https://github.com/acmesh-official/acme.sh/issues/3359 # Please report bugs to https://github.com/acmesh-official/acme.sh/issues/3359
#returns 0 means success, otherwise error. #returns 0 means success, otherwise error.
@ -95,7 +85,6 @@ unifi_deploy() {
# Unifi Controller environment (self hosted or any Cloud Key) -- # Unifi Controller environment (self hosted or any Cloud Key) --
# auto-detect by file /usr/lib/unifi/data/keystore # auto-detect by file /usr/lib/unifi/data/keystore
# auto-detect by file /usr/lib/unifi/data/keystore
_unifi_keystore="${DEPLOY_UNIFI_KEYSTORE:-/usr/lib/unifi/data/keystore}" _unifi_keystore="${DEPLOY_UNIFI_KEYSTORE:-/usr/lib/unifi/data/keystore}"
if [ -f "$_unifi_keystore" ]; then if [ -f "$_unifi_keystore" ]; then
_debug _unifi_keystore "$_unifi_keystore" _debug _unifi_keystore "$_unifi_keystore"
@ -174,11 +163,6 @@ unifi_deploy() {
else else
_reload_cmd="${_reload_cmd:+$_reload_cmd && }systemctl stop unifi" _reload_cmd="${_reload_cmd:+$_reload_cmd && }systemctl stop unifi"
fi fi
if [ ! -f "${DEPLOY_UNIFI_CORE_CONFIG:-/data/unifi-core/config}/unifi-core.key" ]; then
_reload_cmd="${_reload_cmd:+$_reload_cmd && }systemctl restart unifi"
else
_reload_cmd="${_reload_cmd:+$_reload_cmd && }systemctl stop unifi"
fi
fi fi
_services_updated="${_services_updated} unifi" _services_updated="${_services_updated} unifi"
_info "Install Unifi Controller certificate success!" _info "Install Unifi Controller certificate success!"
@ -234,11 +218,6 @@ unifi_deploy() {
cp -f "${_unifi_core_config}"/unifi-core.key "${_unifi_core_config}"/unifi-core_original.key cp -f "${_unifi_core_config}"/unifi-core.key "${_unifi_core_config}"/unifi-core_original.key
_info "Previous certificate and key saved to ${_unifi_core_config}/unifi-core_original.crt/key." _info "Previous certificate and key saved to ${_unifi_core_config}/unifi-core_original.crt/key."
# Save the existing certs in case something goes wrong.
cp -f "${_unifi_core_config}"/unifi-core.crt "${_unifi_core_config}"/unifi-core_original.crt
cp -f "${_unifi_core_config}"/unifi-core.key "${_unifi_core_config}"/unifi-core_original.key
_info "Previous certificate and key saved to ${_unifi_core_config}/unifi-core_original.crt/key."
cat "$_cfullchain" >"${_unifi_core_config}/unifi-core.crt" cat "$_cfullchain" >"${_unifi_core_config}/unifi-core.crt"
cat "$_ckey" >"${_unifi_core_config}/unifi-core.key" cat "$_ckey" >"${_unifi_core_config}/unifi-core.key"

Loading…
Cancel
Save