summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 06:57:35 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 06:57:35 +0000
commit6a2c0a7785a3b60e57e796d7d148c25314fec9d3 (patch)
tree6bcc9035c962a99dafe632ffb642f65976889146 /src
parent432edbf68f41a3257e421427ee33c6634b030e77 (diff)
Merge branch 'cmake'
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1872 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/bin/CMakeLists.txt2
-rw-r--r--src/bin/anoperc.cmake141
2 files changed, 1 insertions, 142 deletions
diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt
index 34044ddf9..e6aea4ec4 100644
--- a/src/bin/CMakeLists.txt
+++ b/src/bin/CMakeLists.txt
@@ -1,6 +1,6 @@
# If not on Windows, generate anoperc and install it along with mydbgen
if(NOT WIN32)
- configure_file(${Anope_SOURCE_DIR}/src/bin/anoperc.cmake ${Anope_BINARY_DIR}/src/bin/anoperc)
+ configure_file(${Anope_SOURCE_DIR}/src/bin/anoperc.in ${Anope_BINARY_DIR}/src/bin/anoperc)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anoperc
DESTINATION .
)
diff --git a/src/bin/anoperc.cmake b/src/bin/anoperc.cmake
deleted file mode 100644
index 3e7cbec62..000000000
--- a/src/bin/anoperc.cmake
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/bin/sh
-#
-# Configuration script for Services
-#
-# (C) 2003-2008 Anope Team
-# Contact us at info@anope.org
-#
-# Please read COPYING and README for further details.
-#
-# Based on the original code of Epona by Lara.
-# Based on the original code of Services by Andy Church.
-#
-# $Id$
-#
-
-
-
-ANOPEPID="@INSTDIR@/data/services.pid"
-ANOPROG="@INSTDIR@/services"
-LOG="@INSTDIR@/data/logs/"
-ARCVERSION="1.2"
-
-isAnopeRunning () {
-if [ ! -f $ANOPEPID ] ; then
- echo "Warning: Anope is not currently running"
- exit 1
-fi
-
-PID=`cat $ANOPEPID`
-
-if [ ! `ps auxw | grep $ANOPROG | grep $PID | grep -v -c grep` ] ; then
- echo "Warning: Anope is not currently running"
- exit 1
-fi
-}
-
-if [ ! -f $ANOPROG ] ; then
- echo "Error: $ANOPROG cannot be accessed"
- exit 1
-fi
-
-
-if [ "$UID" = "0" ] ; then
- echo "######################################";
- echo "# Warning: Do NOT run Anope as root! #";
- echo "######################################";
- exit 1
-fi
-
-if [ "$1" = "start" ] ; then
-
-if [ -f $ANOPEPID ] ; then
- PID=`cat $ANOPEPID`
- if [ `ps auxw | grep $ANOPROG | grep $PID | grep -v -c grep` = 1 ] ; then
- echo "Warning! Anope is already running"
- exit 1
- fi
-fi
- echo "Starting Anope"
- shift
- $ANOPROG $*
- sleep 1
- if [ ! -f $ANOPEPID ] ; then
- echo "Unfortunately it seems Anope did not start successfully"
- echo "This error has been logged in your Anope Log file"
- echo "Located in "$LOG""
- echo "This may help you diagnose the problem"
- echo "Further help may be available from http://www.anope.org/"
- exit 1
- fi
- PID=`cat $ANOPEPID`
- if [ ! `ps auxw | grep $ANOPROG | grep $PID | grep -v -c grep` ] ; then
- echo "Unfortunately it seems Anope did not start successfully"
- echo "This error has been logged in your Anope Log file"
- echo "Located in "$LOG""
- echo "This may help you diagnose the problem"
- echo "Further help may be available from http://www.anope.org/"
- exit 1
- fi
-
-elif [ "$1" = "stop" ] ; then
- isAnopeRunning
- echo "Terminating Anope"
- kill -15 `cat $ANOPEPID`
-
-elif [ "$1" = "status" ] ; then
- if [ -f $ANOPEPID ] ; then
- PID=`cat $ANOPEPID`
- if [ `ps auxw | grep $PID | grep -v -c grep` = 1 ] ; then
- echo "Anope is currently running"
- exit 1
- fi
- fi
-
- echo "Anope is not currently running"
-
-## :/ SIGUSR2 is ignored after the first restart so we stop / start Anope for now ##
-elif [ "$1" = "restart" ] ; then
- isAnopeRunning
- echo "Restarting Anope"
- kill -15 `cat $ANOPEPID`
- sleep 1
- shift
- $ANOPROG $*
-
-elif [ "$1" = "rehash" ] ; then
- isAnopeRunning
- echo "Saving Databases and Rehashing Configuration"
- kill -12 `cat $ANOPEPID`
-
-elif [ "$1" = "version" ] ; then
- $ANOPROG -version
-
-elif [ "$1" = "help" ] ; then
- if [ "$2" = "paramlist" ] ; then
- $ANOPROG -help
- else
- echo "AnopeRC is a remote control script for easy"
- echo "controlling of Anope from the command console"
- echo "$0 start Start Anope"
- echo " Additional parameters may be passed"
- echo " (e.g. $0 start -nofork)"
- echo " For a list type $0 $1 paramlist"
- echo "$0 stop Shutdown Anope"
- echo "$0 status Show Anope's Status"
- echo "$0 restart Restart Anope (Databases will be saved)"
- echo " Additional parameters may be passed"
- echo " (e.g. $0 restart -logchan)"
- echo " For a list type $0 $1 paramlist"
- echo "$0 rehash Rehash Configuration and Save Databases"
- echo "$0 version Return Anope Version and Build Information"
- echo "$0 help Show this help menu"
- echo "If you need further help please check the /docs/"
- echo "folder or make use of our extensive online support at"
- echo "http://www.anope.org/"
- fi
-
-else
- echo "Anope Remote Control ($ARCVERSION)"
- echo "Usage: $0 [start|stop|status|restart|rehash|version|help]"
-fi