]> git.pld-linux.org Git - packages/anope.git/commitdiff
- added
authoraredridel <aredridel@pld-linux.org>
Sat, 28 Apr 2007 22:31:28 +0000 (22:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    anope-fhs.patch -> 1.1
    anope.init -> 1.1
    anope.sysconfig -> 1.1

anope-fhs.patch [new file with mode: 0644]
anope.init [new file with mode: 0644]
anope.sysconfig [new file with mode: 0644]

diff --git a/anope-fhs.patch b/anope-fhs.patch
new file mode 100644 (file)
index 0000000..c55444d
--- /dev/null
@@ -0,0 +1,18 @@
+diff -ur anope-1.7.18-o/include/config.h anope-1.7.18/include/config.h
+--- anope-1.7.18-o/include/config.h    2006-12-31 15:34:10.000000000 -0700
++++ anope-1.7.18/include/config.h      2007-04-28 13:08:29.000000000 -0600
+@@ -22,11 +22,11 @@
+ /******* General configuration *******/
+-/* Name of configuration file (in Services directory) */
+-#define SERVICES_CONF "services.conf"
++/* Name of configuration file */
++#define SERVICES_CONF "/etc/anope/anope.conf"
+ /* Name of log file (in Services directory) */
+-#define LOG_FILENAME  "services.log"
++#define LOG_FILENAME  "/var/log/anope/anope.log"
+ /* Maximum amount of data from/to the network to buffer (bytes). */
+ #define NET_BUFSIZE   65536
diff --git a/anope.init b/anope.init
new file mode 100644 (file)
index 0000000..4d4ffad
--- /dev/null
@@ -0,0 +1,112 @@
+#!/bin/sh
+#
+# anope        anope IRC Services
+#
+# chkconfig:   345 85 15
+# description: anope is an IRC services daemon.
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/anope ] && . /etc/sysconfig/anope
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+               msg_network_down anope
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+start() {
+       daemon --user anope anope
+       RETVAL=$?
+       if [ $RETVAL -eq 0 ]; then
+               touch /var/lock/subsys/anope
+       fi
+       return $RETVAL
+}
+
+stop() {
+       killproc --pidfile /var/run/anope.pid anope
+       rm -f /var/lock/subsys/anope >/dev/null 2>&1
+}
+
+reload() {
+       # sending INT signal will make anope close all listening sockets and
+       # wait for client connections to terminate.
+       killproc --pidfile /var/run/anope.pid anope -HUP
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/anope ]; then
+               msg_starting anope
+               start
+       else
+               msg_already_running anope
+       fi
+       ;;
+  stop)
+       # Stop daemons.
+       if [ -f /var/lock/subsys/anope ]; then
+               msg_stopping anope
+               stop
+       else
+               msg_not_running anope
+       fi
+       ;;
+  status)
+       status anope
+       RETVAL=$?
+       ;;
+  restart)
+       if [ -f /var/lock/subsys/anope ]; then
+               msg_stopping anope
+               stop
+               msg_starting anope
+               start
+               RETVAL=$?
+       else
+               msg_not_running anope
+               msg_starting anope
+               start
+       fi
+       ;;
+  reload|graceful|force-reload)
+       if [ -f /var/lock/subsys/anope ]; then
+               msg_reloading anope
+               reload
+               RETVAL=$?
+       else
+               msg_not_running anope
+               RETVAL=7
+       fi
+       ;;
+  flush-logs)
+       if [ -f /var/lock/subsys/anope ]; then
+               nls "Rotating %s logs" anope
+               killproc --pidfile /var/run/anope.pid anope -HUP
+               RETVAL=$?
+       else
+               msg_not_running anope
+               RETVAL=7
+       fi
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|flush-logs|status}"
+       exit 3
+       ;;
+esac
+
+exit $RETVAL
diff --git a/anope.sysconfig b/anope.sysconfig
new file mode 100644 (file)
index 0000000..d3d16a3
--- /dev/null
@@ -0,0 +1,4 @@
+# Customized settings for anope
+
+# Define nice level for anope
+#SERVICE_RUN_NICE_LEVEL="+0"
This page took 0.111552 seconds and 4 git commands to generate.