## adjust these variables to your need
export MY_USER=jiveWF
export RCD_PATH=/etc/rc.d
export INITD_PATH=/etc/rc.d/init.d

## create user jiveWF (or simply jive), options: create a lv (logical volume)
adduser ${MY_USER}
passwd ${MY_USER}

## make sure that only ${MY_USER}  can access /home/jiveWF/WF/conf/*.xml and /home/jiveWF/WF/embedded-db/*
chmod 700 /home/${MY_USER}

## uninstall old rc scripts
rm -f ${INITD_PATH}/openfired ${INITD_PATH}/wildfired
for i in 0 1 2 3 4 5 6
do
cd ${RCD_PATH}/rc${i}.d && rm -f ???wildfired
cd ${RCD_PATH}/rc${i}.d && rm -f ???openfired
done

## install new rc scripts
## adjust S20openfired and K80openfired to your needs. if you run another database
## and want to use it with Wildfire then make sure that the database is started
## before Openfire and shutdown after it.
## With S20 Openfire is started very early, it's fine for the embedded database.
for i in 0 1 6
do
cd ${RCD_PATH}/rc${i}.d && ln -s ${INITD_PATH}/openfired K80openfired
done
for i in 2 3 4 5
do
cd ${RCD_PATH}/rc${i}.d && ln -s ${INITD_PATH}/openfired S20openfired
done
