X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/d6af243d1320e0b258a088ff33e262b41594ad44..2aa11d1e104d9251d0217367d9b869c40b630106:/debian/sipb-xen-database-server.init diff --git a/debian/sipb-xen-database-server.init b/debian/sipb-xen-database-server.init index be4831b..c4e1537 100644 --- a/debian/sipb-xen-database-server.init +++ b/debian/sipb-xen-database-server.init @@ -1,77 +1,19 @@ #!/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 +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.3/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"