/[packages]/cauldron/ircd-hybrid/current/SOURCES/ircd-hybrid.init
ViewVC logotype

Contents of /cauldron/ircd-hybrid/current/SOURCES/ircd-hybrid.init

Parent Directory Parent Directory | Revision Log Revision Log


Revision 398256 - (show annotations) (download)
Wed Feb 13 20:54:26 2013 UTC (11 years, 2 months ago) by colin
File size: 1594 byte(s)
Drop sysconfig file (it's contents were unused)
1 #!/bin/sh
2 #
3 # ircd-hybrid This shell script takes care of starting and stopping ircd.
4 #
5 # chkconfig: 345 97 13
6 # description: Internet Relay Chat Server.
7 #
8 # processname: ircd-hybrid
9 # pidfile: /var/run/ircd-hybrid/ircd-hybrid.pid
10 # config: /etc/sysconfig/network
11 # config: /etc/ircd-hybrid/ircd.conf
12 ### BEGIN INIT INFO
13 # Provides: ircd-hybrid
14 # Required-Start: $network
15 # Required-Stop: $network
16 # Default-Start: 3 4 5
17 # Short-Description: Internet Relay Chat Server
18 # Description: Internet Relay Chat Server
19 ### END INIT INFO
20
21 # Source function library.
22 . /etc/rc.d/init.d/functions
23
24 # Source networking configuration.
25 . /etc/sysconfig/network
26
27 # Check that networking is up.
28 if [ ${NETWORKING} = "no" ]
29 then
30 exit 0
31 fi
32
33 [ -f /usr/sbin/ircd-hybrid ] || exit 0
34
35 # See how we were called.
36 case "$1" in
37 start)
38 # Check if the service is already running?
39 if [ ! -f /var/lock/subsys/ircd-hybrid ]; then
40 # Start daemons.
41 echo -n "Starting IRCd Server:"
42 daemon --user=ircd-hybrid /usr/sbin/ircd-hybrid
43 echo
44 touch /var/lock/subsys/ircd-hybrid
45 else
46 echo "Already running IRCd Server"
47 fi
48 ;;
49 stop)
50 # Check if the service is already running?
51 if [ -f /var/lock/subsys/ircd-hybrid ]; then
52 # Stop daemons.
53 echo -n "Stopping IRCd Server:"
54 killproc ircd-hybrid
55 echo
56 rm -f /var/run/ircd-hybrid/ircd-hybrid.pid /var/lock/subsys/ircd-hybrid >/dev/null 2>&1
57 else
58 echo "Already stopped IRCd Server"
59 fi
60 ;;
61 status)
62 status ircd-hybrid
63 ;;
64 restart|force-reload)
65 $0 stop
66 $0 start
67 ;;
68 *)
69 echo "Usage: $0 {start|stop|restart|force-reload|status}"
70 exit 1
71 esac
72
73 exit 0

  ViewVC Help
Powered by ViewVC 1.1.30