#!/bin/ksh
#
# Component: billing
#
# Description:
#  Control script of component billing
#
# Last Updated     : $Author$
# Update Date Time : $Date$
# RCS File Name    : $RCSfile$
# RCS Revision     : $Revision$
# Locked by        : $Locker$
# Symbolic name    : $Name$
# State            : $State$

#--- INIT ------------------------------
#needs $HOME
. $HOME/etc/ctrl.main.shi

[ -f $HOME/etc/setenv.sh ] && . $HOME/etc/setenv.sh

#--- FUNC ------------------------------
do_shell_()
{
  cat <<EndOfInlineData
BILLING_HOME=$HOME/component/billing
BILLING_VAR=$VAR/billing

EndOfInlineData

} #do_shell_()


do_start_()
{
  [ ! -d "$BILLING_VAR" ] && mkdir $BILLING_VAR 2>/dev/null

} #do_start


#
# List files/tables to be backed up grouped by categories
#
# output lines should be in '<category> <type> <names>' format
#
do_listbackup_()
{
	cat <<-EOFLISTBACKUP
		config.system FILE ${BILLING_VAR#$HOME/}
	EOFLISTBACKUP
}


#--- MAIN ------------------------------

check_action_ $1
if [ 0 = $? ]; then
  do_$1_

else
  echo "--- Component billing [ctrl $$]: Bad command: $1" >&2
  exit 1

fi
