]> git.pld-linux.org Git - packages/gkrellm.git/blame - gkrellmd.init
- fix PKGCONFIGDIR to allow build on amd64
[packages/gkrellm.git] / gkrellmd.init
CommitLineData
a9223491 1#!/bin/sh
2#
3# gkrellmd gkrellmd - The GNU Krell Monitors Server
4#
5# chkconfig: 345 95 10
6#
6fe36520 7# description: gkrellmd Listens for connections from gkrellm clients. When a gkrellm \
8# client connects to a gkrellmd server all builtin monitors collect their \
a9223491 9# data from the server.
10#
11# processname: gkrellmd
12# config: /etc/gkrellmd.conf
13# pidfile: /var/run/gkrellmd.pid
14#
15# $Id$
16
17
18# Source function library
19. /etc/rc.d/init.d/functions
20
21# Get network config
22. /etc/sysconfig/network
23
24# Set defaults
25OPTIONS="-d"
26
27# Get service config - may override defaults
28[ -f /etc/sysconfig/gkrellmd ] && . /etc/sysconfig/gkrellmd
29
30# Check that networking is up.
31if is_yes "${NETWORKING}"; then
082e7660 32 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
a9223491 33 # nls "ERROR: Networking is down. %s can't be run." gkrellmd
6581695b 34 msg_network_down gkrellmd
a9223491 35 exit 1
36 fi
37else
38 exit 0
39fi
40
51a0db10 41RETVAL=0
a9223491 42# See how we were called.
43case "$1" in
44 start)
45 if [ ! -f /var/lock/subsys/gkrellmd ]; then
46 msg_starting gkrellmd
6581695b 47 daemon gkrellmd $OPTIONS
a9223491 48 RETVAL=$?
49 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gkrellmd
50 else
51 msg_already_running gkrellmd
a9223491 52 fi
53 ;;
54 stop)
55 if [ -f /var/lock/subsys/gkrellmd ]; then
56 msg_stopping gkrellmd
57 killproc gkrellmd
a9223491 58 rm -f /var/lock/subsys/gkrellmd
59 else
60 msg_not_running gkrellmd
a9223491 61 fi
62 ;;
51a0db10 63 restart|force-reload)
a9223491 64 $0 stop
65 $0 start
51a0db10 66 exit $?
a9223491 67 ;;
68 status)
69 status gkrellmd
51a0db10 70 exit $?
a9223491 71 ;;
72 *)
51a0db10 73 msg_usage "$0 {start|stop|restart|force-reload|status}"
74 exit 3
a9223491 75esac
76
77exit $RETVAL
78
79# This must be last line !
80# vi:syntax=sh:tw=78:ts=8:sw=4
This page took 0.108709 seconds and 4 git commands to generate.