Apache CloudStack for Arch Linux
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
post_install() {
|
|
|
|
# Generate mandatory GUID value
|
|
GUID=$(uuidgen)
|
|
FILE="/etc/cloudstack/agent/agent.properties"
|
|
if [[ ! $(cat "${FILE}" | sed -nr 's/^guid=(.*)/\1/p') ]]; then
|
|
sed -i -r "s/^(guid=)/\1$GUID/" "${FILE}"
|
|
fi
|
|
|
|
# Generate mandatory UUID value
|
|
UUID=$(uuidgen)
|
|
if [[ ! $(cat "${FILE}" | sed -nr 's/^local\.storage\.uuid=(.*)/\1/p') ]]; then
|
|
sed -i -r "s/^(local\.storage\.uuid=)/\1$UUID/" "${FILE}"
|
|
fi
|
|
}
|
|
|
|
#post_upgrade() {
|
|
#}
|