#!/bin/bash
# this is our post-boot processing entry-point to replace what we did in vami
# it is configured to run after networking but before other hzn services are started.
#
# chkconfig: 3 40 60
# description: networking helper
# author: saaswatch@vmware.com
# version: 2.1.2.RELEASE
# build date:
#
### BEGIN INIT INFO
# Provides: hzn-sysconfig
# Required-Start: random network vaos
# Required-Stop:
# Should-Start: haproxy vpostgres rabbitmq-server
# Should-Stop: haproxy vpostgres rabbitmq-server
# Default-Start:  3 5
# Default-Stop:   0
# Description:    horizon post-boot setup
### END INIT INFO


if [ "$1" != "start" ] ; then
    # only do something on start
    exit 0
fi

#detect and handle a cloned instance
/usr/local/horizon/scripts/clonework.hzn

# place custom code in the sysconfig script below
/usr/local/horizon/scripts/sysconfig.hzn
