update web page
[myplc.git] / plc.d / syslog
1 #!/bin/bash
2 #
3 # priority: 200
4 #
5 # Do not use the standard syslog initscript. It will start up a
6 # (probably duplicate) copy of klogd, and on shutdown, if a pidfile is
7 # not found, will (probably) kill the host syslogd and klogd instances
8 # as well.
9 #
10 # Mark Huang <mlhuang@cs.princeton.edu>
11 # Copyright (C) 2006 The Trustees of Princeton University
12 #
13 # $Id: syslog,v 1.1 2006/04/06 21:51:59 mlhuang Exp $
14 #
15
16 # Source function library and configuration
17 . /etc/plc.d/functions
18 . /etc/planetlab/plc_config
19
20 case "$1" in
21     start)
22         MESSAGE=$"Starting system logger"
23         dialog "$MESSAGE"
24
25         plc_daemon syslogd -m 0
26         check
27
28         result "$MESSAGE"
29         ;;
30
31     stop)
32         MESSAGE=$"Shutting down system logger"
33         dialog "$MESSAGE"
34
35         killproc plc_syslogd
36         check
37
38         result "$MESSAGE"
39         ;;
40 esac
41
42 exit $ERRORS