Set the document root to /data/var/www/html (static files
[myplc.git] / plc.d / dns
1 #!/bin/bash
2 #
3 # priority: 850
4 #
5 # Start local DNS server to provide minimal DNS forward resolution for
6 # ourselves and our nodes.
7 #
8 # Mark Huang <mlhuang@cs.princeton.edu>
9 # Copyright (C) 2006 The Trustees of Princeton University
10 #
11 # $Id: dns,v 1.2 2006/05/26 19:57:30 mlhuang Exp $
12 #
13
14 # Source function library and configuration
15 . /etc/plc.d/functions
16 . /etc/planetlab/plc_config
17
18 # Be verbose
19 set -x
20
21 case "$1" in
22     start)
23         if [ "$PLC_DNS_ENABLED" != "1" ] ; then
24             exit 0
25         fi
26
27         MESSAGE=$"Starting DNS server"
28         dialog "$MESSAGE"
29
30         dns-config
31         check
32
33         plc_daemon dnsmasq
34         check
35
36         result "$MESSAGE"
37         ;;
38
39     stop)
40         MESSAGE=$"Stopping DNS server"
41         dialog "$MESSAGE"
42
43         killproc plc_dnsmasq
44         check
45
46         result "$MESSAGE"
47         ;;
48 esac
49
50 exit $ERRORS