source: trunk/packages/invirt-console-host/debian/invirt-console-host.init @ 1208

Last change on this file since 1208 was 1198, checked in by price, 16 years ago

fix old bug in invirt-console-host initscript

Also simplify initscript dramatically, like our other good initscripts.

  • Property svn:executable set to *
File size: 945 bytes
Line 
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides:          invirt-console-host
4# Required-Start:    $local_fs $remote_fs
5# Required-Stop:     $local_fs $remote_fs
6# Default-Start:     2 3 4 5
7# Default-Stop:      0 1 6
8# Short-Description: conserver config from invirt-config for Invirt host
9# Description:       
10### END INIT INFO
11
12PACKAGE=invirt-console-host
13PARENTPACKAGE=conserver-server
14
15dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0
16
17. /lib/init/vars.sh
18. /lib/lsb/init-functions
19
20gen_config()
21{
22        for i in /etc/conserver/invirt-genconfig.cf
23        do mako-render $i.mako > $i
24        done
25}
26
27case "$1" in
28  start|reload|force-reload|restart)
29    log_begin_msg "Reloading config for $PACKAGE"
30    gen_config
31    log_end_msg $?
32    /etc/init.d/"$PARENTPACKAGE" "$1"
33    ;;
34  stop)
35    /etc/init.d/"$PARENTPACKAGE" "$1"
36    ;;
37  *)
38    log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"
39    ;;
40esac
Note: See TracBrowser for help on using the repository browser.