source: package_tags/sipb-xen-www/3.14.2/debian/sipb-xen-www.init @ 2108

Last change on this file since 2108 was 952, checked in by price, 16 years ago

reload (etc) apache after regenerating its config

  • Property svn:executable set to *
File size: 761 bytes
Line 
1#!/bin/bash
2### BEGIN INIT INFO
3# Provides:          sipb-xen-www
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=sipb-xen-www
13
14. /lib/lsb/init-functions
15
16gen_config()
17{
18  for i in /etc/apache2/sites-available/{ssl,svn}
19  do mako-render $i.mako > $i
20  done
21}
22
23case "$1" in
24  start|reload|force-reload|restart)
25    log_begin_msg "Reloading config for $PACKAGE"
26    gen_config
27    log_end_msg $?
28    /etc/init.d/apache2 "$1"
29    ;;
30  stop)
31    ;;
32  *)
33    log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"
34    ;;
35esac
Note: See TracBrowser for help on using the repository browser.