The database wants to be not transactional, and not autoflushing
[invirt/packages/invirt-database.git] / debian / sipb-xen-database-server.init
index b4f805e..8c9a4b3 100644 (file)
@@ -9,69 +9,31 @@
 # Description:       
 ### END INIT INFO
 
-# Author: SIPB Xen Project <sipb-xen@mit.edu>
-
-# 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-tables
 
 # 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
-
-: