X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/888ffabe00bd978fcea16b609f2c65162c44c865..b30fd0f5ea0ac4b813d8038331e8814662f8f953:/debian/sipb-xen-database-server.init diff --git a/debian/sipb-xen-database-server.init b/debian/sipb-xen-database-server.init index b4f805e..431e675 100644 --- a/debian/sipb-xen-database-server.init +++ b/debian/sipb-xen-database-server.init @@ -1,77 +1,39 @@ #!/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 - -# Do NOT "set -e" - -# 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 +PACKAGE=sipb-xen-database-server # 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 +[ -x "/usr/bin/sipb-xen-database-tables" ] || exit 0 -# 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 - + for i in /etc/postgresql/8.3/main/pg_hba.conf + do mako-render $i.mako > $i + done } case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" -gen_config - ;; + start|reload|force-reload|restart) + log_begin_msg "Reloading config for $PACKAGE" + gen_config + log_end_msg $? + /etc/init.d/postgresql-8.3 "$1" + ;; 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 - ;; + log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}" + ;; esac - -: