X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-console.git/blobdiff_plain/305a44202cfdaab54a975fef73c275bd5b7dab05..1d4d0f8536d5ad6c3ba79aaa06a8a0909d9f9292:/debian/invirt-console-host.init?ds=sidebyside diff --git a/debian/invirt-console-host.init b/debian/invirt-console-host.init index 887bc3e..5d19df7 100755 --- a/debian/invirt-console-host.init +++ b/debian/invirt-console-host.init @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash ### BEGIN INIT INFO # Provides: invirt-console-host # Required-Start: $local_fs $remote_fs @@ -11,30 +11,9 @@ 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