#! /usr/bin/env bash

#
# zenoss_init_post
#
# This script is intended to be run after the zenoss processes have
# been started for the first time.
#
# Note: it is run by root
#

#############################################################################
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2007, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# For complete information please visit: http://www.zenoss.com/oss/
#############################################################################

# environment variables
export OS_USERNAME="**OS_USERNAME**"
export OS_UID="**OS_UID**"
export ZENHOME="**ZENHOME**"
export MYSQLHOST="**MYSQL_HOST**"
export MYSQLROOTUSER="**MYSQL_ROOT_USERNAME**"
export MYSQLROOTPASSWD="**MYSQL_ROOT_PASSWD**"
export MYSQLUSER="**MYSQL_USERNAME**"
export MYSQLPASS="**MYSQL_PASSWD**"
export MYSQLEVENTDB="**MYSQL_DATABASE**"
export ZOPEPASSWORD="**ZOPE_PASSWD**"
export ZOPEHOME="**ZOPEHOME**"

# load the installation functions
. ${ZENHOME}/bin/shared-functions.sh
. ${ZENHOME}/bin/install-functions.sh


# add localhost as a device to zenoss
add_localhost_device
