]> git.pld-linux.org Git - packages/coda.git/blame - coda.auth2.init
- dropped pre-cvs changelog
[packages/coda.git] / coda.auth2.init
CommitLineData
bf7542bc 1#!/bin/sh
2#
b0300ebb 3# auth2
bf7542bc 4#
5# chkconfig: 345 95 01
6#
7# description: The Coda authentication server
8#
9
10# Source function library
11. /etc/rc.d/init.d/functions
12
13# Get network config
14. /etc/sysconfig/network
15
16# Check that networking is up
fde3a400 17if is_yes "${NETWORKING}"; then
21f06a93 18 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
fde3a400 19 msg_network_down auth2
20 exit 1
21 fi
22else
23 exit 0
bf7542bc 24fi
25
5a8a8a34 26RETVAL=0
bf7542bc 27case "$1" in
a61a406d 28 start)
29 # Check if the service is already running?
5a8a8a34 30 if [ ! -f /var/lock/subsys/auth2 ]; then
a61a406d 31 msg_starting auth2
32 daemon auth2
33 RETVAL=$?
34 [ RETVAL -eq 0 ] && touch /var/lock/subsys/auth2
5a8a8a34 35 else
36 msg_already_running auth2
bf7542bc 37 fi
a61a406d 38 ;;
39 stop)
40 if [ -f /var/lock/subsys/auth2 ]; then
41 msg_stopping auth2
42 killproc auth2
43 rm -f /var/lock/subsys/auth2
bf7542bc 44 else
a61a406d 45 msg_not_running auth2
bf7542bc 46 fi
a61a406d 47 ;;
48 status)
5a8a8a34 49 status auth2
50 exit $?
a61a406d 51 ;;
5a8a8a34 52 restart|force-reload)
a61a406d 53 $0 stop
bf7542bc 54 $0 start
5a8a8a34 55 exit $?
a61a406d 56 ;;
57 *)
5a8a8a34 58 msg_usage "$0 {start|stop|restart|force-reload|status}"
59 exit 3
bf7542bc 60 ;;
61esac
62
63exit $RETVAL
This page took 0.141303 seconds and 4 git commands to generate.