13 lines
726 B
Bash
13 lines
726 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# This is when landscape-haproxy the cert is SELFSIGNED. This will ensure that landscape will work
|
||
|
landscape_crt=$(juju run --application landscape-haproxy 'sudo openssl x509 -in /var/lib/haproxy/default.pem' | base64)
|
||
|
juju config landscape-client ssl-public-key="base64:${landscape_crt}"
|
||
|
|
||
|
# And yes, this needs to use the IP address, otherwise the the registration will fail
|
||
|
landscape_ip=$(juju run --application landscape-haproxy 'unit-get private-address')
|
||
|
juju config landscape-client url="https://${landscape_ip}/message-system" ping-url="http://${landscape_ip}/ping"
|
||
|
|
||
|
# May need to restart all the landscape-clients
|
||
|
#juju run --application landscape-client 'sudo systemctl restart landscape-client.service'
|