(*) defines new method locate_varname used by plc-config-tty
[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: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $
14 #
15
16 # Source function library and configuration
17 . /etc/plc.d/functions
18
19 case "$1" in
20     start)
21         MESSAGE=$"Starting system logger"
22         dialog "$MESSAGE"
23
24         plc_daemon syslogd -m 0
25         check
26
27         result "$MESSAGE"
28         ;;
29
30     stop)
31         MESSAGE=$"Shutting down system logger"
32         dialog "$MESSAGE"
33
34         killproc plc_syslogd
35         check
36
37         result "$MESSAGE"
38         ;;
39 esac
40
41 exit $ERRORS