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.

18 lines
461 B

  1. post_install() {
  2. # Generate mandatory GUID value
  3. GUID=$(uuidgen)
  4. FILE="/etc/cloudstack/agent/agent.properties"
  5. if [[ ! $(cat "${FILE}" | sed -nr 's/^guid=(.*)/\1/p') ]]; then
  6. sed -i -r "s/^(guid=)/\1$GUID/" "${FILE}"
  7. fi
  8. # Generate mandatory UUID value
  9. UUID=$(uuidgen)
  10. if [[ ! $(cat "${FILE}" | sed -nr 's/^local\.storage\.uuid=(.*)/\1/p') ]]; then
  11. sed -i -r "s/^(local\.storage\.uuid=)/\1$UUID/" "${FILE}"
  12. fi
  13. }
  14. #post_upgrade() {
  15. #}