#!/bin/bash
### BEGIN INIT INFO
-# Provides: sipb-xen-console
+# Provides: sipb-xen-database-server
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: sipb-xen Console Server homedir filesystem
+# Short-Description: sipb-xen database server
# Description:
### END INIT INFO
-# Author: SIPB Xen Project <sipb-xen@mit.edu>
+PACKAGE=sipb-xen-database-server
+PARENTPACKAGE=postgresql-8.3
+GEN_FILES=/etc/postgresql/8.3/main/pg_hba.conf
-# Do NOT "set -e"
+dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="The sipb-xen database server"
-NAME=sipb-xen-database-server
-
-
-
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x "/usr/bin/sipb-xen-database-tabales" ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
-
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-. /lib/lsb/init-functions
-
-gen_config()
-{
- for i in /etc/postgresql/8.1/main/pg_hba.conf
- ; do
- mako-render $i.mako > $i
- done
-}
-
-do_reload()
-{
- gen_config
-
-}
-
-case "$1" in
- start)
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
-gen_config
- ;;
- stop)
- ;;
- reload|force-reload)
- log_daemon_msg "Reloading $DESC" "$NAME"
- do_reload
- log_end_msg $?
- ;;
- restart)
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
- *)
- echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
- exit 3
- ;;
-esac
-
-:
+. /lib/init/config-init.sh
+config_init "$1"