Use a simpler query construct in ConsoleFS.
[invirt/packages/invirt-console.git] / debian / invirt-console-host.init
index 887bc3e..5d19df7 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 ### BEGIN INIT INFO
 # Provides:          invirt-console-host
 # Required-Start:    $local_fs $remote_fs
 
 PACKAGE=invirt-console-host
 PARENTPACKAGE=conserver-server
+GEN_FILES=/etc/conserver/invirt-genconfig.cf
 
 dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0
 
-. /lib/init/vars.sh
-. /lib/lsb/init-functions
-
-gen_config()
-{
-        for i in /etc/conserver/invirt-genconfig.cf
-        do mako-render $i.mako > $i
-        done
-}
-
-case "$1" in
-  start|reload|force-reload|restart)
-    log_begin_msg "Reloading config for $PACKAGE"
-    gen_config
-    log_end_msg $?
-    /etc/init.d/"$PARENTPACKAGE" "$1"
-    ;;
-  stop)
-    /etc/init.d/"$PARENTPACKAGE" "$1"
-    ;;
-  *)
-    log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"
-    ;;
-esac
+. /lib/init/config-init.sh
+config_init $1