diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-31 21:36:39 -0400 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-31 21:36:39 -0400 |
commit | 2c9845db4bc00221bc3c2343a020208f7f532166 (patch) | |
tree | 843bc24a1bbf2cad33c4bdc8a17c3d0d838fceb4 /scripts/hostclass/unifi_controller | |
parent | 7eb111136453d0e8d8451d7dd85ba9892318f294 (diff) | |
download | infrastructure-2c9845db4bc00221bc3c2343a020208f7f532166.tar.gz |
many fixes
Diffstat (limited to 'scripts/hostclass/unifi_controller')
-rw-r--r-- | scripts/hostclass/unifi_controller | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/hostclass/unifi_controller b/scripts/hostclass/unifi_controller index 9fd161e..96558e1 100644 --- a/scripts/hostclass/unifi_controller +++ b/scripts/hostclass/unifi_controller @@ -33,6 +33,10 @@ service unifi status && service unifi stop [ -f "${unifi_home}/data/keystore" ] || install -Cv -o "$unifi_user" -g "$unifi_user" -m 0600 /dev/null "${unifi_home}/data/keystore" su -m "$unifi_user" -c "java -jar ${unifi_home}/lib/ace.jar import_key_cert ${unifi_https_key} ${unifi_https_cert} ${site_cacert_path}" +# Add root CA to java keystore. +keytool -list -cacerts -storepass changeit -alias "$site" \ + || keytool -import -trustcacerts -cacerts -storepass changeit -noprompt -alias "$site" -file "$site_cacert_path" + # Disable analytics. install_directory -m 0640 -o "$unifi_user" -g "$unifi_user" \ "${unifi_home}/data/sites" \ |