mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-29 00:46:38 +02:00
Added make install and ./unreal utility
This commit is contained in:
@@ -892,3 +892,5 @@ seen. gmtime warning still there
|
||||
- Fixed a typo in makenet found by 'Eternal Bliss'
|
||||
- Updated module dependancies to allow a module to load the module containing the symbol
|
||||
- Fixed a win32 bug where the editor would cut off text, reported by Inter
|
||||
- Added make install to copy files for you when you install unreal
|
||||
- Replaced killircd, ircd, and rehash with ./unreal start|stop|rehash
|
||||
|
||||
+19
-7
@@ -92,7 +92,7 @@ IRCDMODE = 711
|
||||
# [CHANGEME]
|
||||
# IRCDDIR must be the same as DPATH in include/config.h
|
||||
#
|
||||
IRCDDIR=/usr/local/lib/ircd
|
||||
IRCDDIR=@IRCDDIR@
|
||||
|
||||
|
||||
#
|
||||
@@ -120,9 +120,8 @@ CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) $(FD_SETSIZE)
|
||||
|
||||
SHELL=/bin/sh
|
||||
SUBDIRS=src
|
||||
BINDIR=$(IRCDDIR)
|
||||
MANDIR=/usr/local/man
|
||||
INSTALL=/usr/bin/install
|
||||
BINDIR=@BINDIR@
|
||||
INSTALL=@INSTALL@
|
||||
RM=@RM@
|
||||
CP=@CP@
|
||||
TOUCH=@TOUCH@
|
||||
@@ -133,7 +132,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
|
||||
'LDFLAGS=${LDFLAGS}' 'IRCDMODE=${IRCDMODE}' \
|
||||
'RES=${RES}' 'BINDIR=${BINDIR}' 'INSTALL=${INSTALL}' \
|
||||
'INCLUDEDIR=${INCLUDEDIR}' 'IRCDDIR=${IRCDDIR}' \
|
||||
'MANDIR=${MANDIR}' 'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
|
||||
'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
|
||||
'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}' \
|
||||
'CRYPTOLIB=${CRYPTOLIB}' 'REGEX=${REGEX}' \
|
||||
'CRYPTOINCLUDES=${CRYPTOINCLUDES}'
|
||||
@@ -207,9 +206,22 @@ depend:
|
||||
done
|
||||
|
||||
install: all
|
||||
@echo "Now install by hand; make install is broken."
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)
|
||||
$(INSTALL) -m 0700 src/ircd $(BINDIR)
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/networks
|
||||
$(INSTALL) -m 0600 networks/*.network $(IRCDDIR)/networks
|
||||
$(INSTALL) -m 0700 networks/makenet $(IRCDDIR)/networks
|
||||
$(INSTALL) -m 0600 networks/networks.ndx $(IRCDDIR)/networks
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/doc
|
||||
$(INSTALL) -m 0600 doc/Authors doc/conf.doc doc/faq doc/tao.of.irc doc/coding-guidelines doc/example.conf doc/features.txt doc/unrealircd.conf.txt doc/Crule.readme doc/commands.txt doc/example.settings doc/services-install-guide doc/unrealircd.doc $(IRCDDIR)/doc
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/aliases
|
||||
$(INSTALL) -m 0600 aliases/*.conf $(IRCDDIR)/aliases
|
||||
$(TOUCH) $(IRCDDIR)/unrealircd.conf
|
||||
chmod 0600 $(IRCDDIR)/unrealircd.conf
|
||||
$(INSTALL) -m 0600 badwords.*.conf LICENSE Donation $(IRCDDIR)
|
||||
$(INSTALL) -m 0700 bugreport makeconf unreal $(IRCDDIR)
|
||||
|
||||
pem: src/ssl.cnf
|
||||
pem: src/ssl.cnf
|
||||
@echo "Generating certificate request .. "
|
||||
$(OPENSSLPATH) req -new \
|
||||
-config src/ssl.cnf -out server.req.pem \
|
||||
|
||||
@@ -19,6 +19,7 @@ AC_PATH_PROG(RM,rm)
|
||||
AC_PATH_PROG(CP,cp)
|
||||
AC_PATH_PROG(TOUCH,touch)
|
||||
AC_PATH_PROG(OPENSSLPATH,openssl)
|
||||
AC_PATH_PROG(INSTALL,install)
|
||||
dnl Checks for libraries.
|
||||
AC_CHECK_LIB(descrypt, crypt, IRCDLIBS="$IRCDLIBS-ldescrypt " MKPASSWDLIBS="-ldescrypt",
|
||||
AC_CHECK_LIB(crypt, crypt,IRCDLIBS="$IRCDLIBS-lcrypt " MKPASSWDLIBS="-lcrypt"))
|
||||
@@ -300,19 +301,20 @@ AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`")
|
||||
AC_ARG_WITH(permissions, [ --with-permissions=permissions Specify the default permissions for
|
||||
configuration files], AC_DEFINE_UNQUOTED(DEFAULT_PERMISSIONS,$withval), AC_DEFINE(DEFAULT_PERMISSIONS, 0600))
|
||||
AC_ARG_WITH(dpath, [ --with-dpath=path Specify the path where configuration files are stored],
|
||||
AC_DEFINE_UNQUOTED(DPATH, "$withval"), AC_DEFINE_UNQUOTED(DPATH, "`pwd`"))
|
||||
AC_DEFINE_UNQUOTED(DPATH, "$withval") IRCDDIR="$withval", AC_DEFINE_UNQUOTED(DPATH,"`pwd`") IRCDDIR="`pwd`")
|
||||
AC_ARG_WITH(fd-setsize, [ --with-fd-setsize=size Specify the max file descriptors to use],
|
||||
ac_fd=$withval, ac_fd=1024)
|
||||
AC_DEFINE_UNQUOTED(MAXCONNECTIONS, $ac_fd)
|
||||
AC_ARG_WITH(spath, [ --with-spath Specify the location of the executable],
|
||||
AC_DEFINE_UNQUOTED(SPATH,"$withval"),AC_DEFINE_UNQUOTED(SPATH,"`pwd`/src/ircd"))
|
||||
AC_DEFINE_UNQUOTED(SPATH,"$withval") BINDIR="$withval",AC_DEFINE_UNQUOTED(SPATH,"`pwd`/src/ircd") BINDIR="`pwd`/src/ircd")
|
||||
AC_ARG_ENABLE(nospoof, [ --enable-nospoof Enable spoofing protection], AC_DEFINE(NOSPOOF))
|
||||
AC_ARG_ENABLE(hub, [ --enable-hub Compile as a hub server], AC_DEFINE(HUB))
|
||||
AC_ARG_ENABLE(ssl, [ --enable-ssl Enable client and server SSL connections ], AC_ENABLE_SSL)
|
||||
AC_ARG_ENABLE(dynamic-linking, [ --enable-dynamic-linking Make the IRCd dynamically link shared objects rather than statically ], AC_ENABLE_DYN, AC_DEFINE(STATIC_LINKING))
|
||||
AC_ARG_ENABLE(inet6, [ --enable-inet6 Make the IRCd support IPv6 ], AC_ENABLE_INET6)
|
||||
AC_ARG_ENABLE(standardthreads, [ --enable-standardthreads Use standard threads ], USESTDTHREAD="1")
|
||||
|
||||
AC_SUBST(IRCDDIR)
|
||||
AC_SUBST(BINDIR)
|
||||
ACX_PTHREAD
|
||||
CC="$PTHREAD_CC"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/bin/sh
|
||||
# IRCD Script v3.0
|
||||
# $Id$
|
||||
#
|
||||
DIR=`pwd`
|
||||
DATE=`date +"%a, %b %e %Y"`
|
||||
TIME=`date +"%H:%M:%S %Z"`
|
||||
IRCDPID="ircd.pid"
|
||||
BACKUP="ircd.bak"
|
||||
|
||||
if [ -r $IRCDPID ]; then
|
||||
mv -f $IRCDPID $BACKUP
|
||||
src/ircd
|
||||
sleep 1
|
||||
if [ ! -r $IRCDPID ]; then
|
||||
mv -f $BACKUP $IRCDPID
|
||||
echo "=========================================="
|
||||
echo "|| Error encountered (IRCd not started) ||"
|
||||
echo "=========================================="
|
||||
echo "Check ircd.log and the messages above for more information"
|
||||
echo "If you cannot solve the problem, check Unreal.nfo on where"
|
||||
echo "to ask for support."
|
||||
echo "Output of ircd.log:"
|
||||
tail ircd.log
|
||||
exit
|
||||
else
|
||||
echo "|----------------------------------------"
|
||||
echo "| UnrealIRCD successfully loaded."
|
||||
echo "| Directory: $DIR"
|
||||
echo "| Date: $DATE"
|
||||
echo "| Time: $TIME"
|
||||
PID=`cat ircd.pid`
|
||||
echo "| Process ID: $PID"
|
||||
echo "|----------------------------------------"
|
||||
rm -f $BACKUP
|
||||
fi
|
||||
else
|
||||
src/ircd
|
||||
sleep 2
|
||||
if [ ! -r $IRCDPID ]; then
|
||||
echo "=========================================="
|
||||
echo "|| Error encountered (IRCd not started) ||"
|
||||
echo "=========================================="
|
||||
echo "Check ircd.log and the messages above for more information"
|
||||
echo "If you cannot solve the problem, check Unreal.nfo on where"
|
||||
echo "to ask for support."
|
||||
echo ""
|
||||
echo "Output of ircd.log:"
|
||||
tail ircd.log
|
||||
exit
|
||||
else
|
||||
echo "|----------------------------------------"
|
||||
echo "| UnrealIRCD successfully loaded."
|
||||
echo "| Directory: $DIR"
|
||||
echo "| Date: $DATE"
|
||||
echo "| Time: $TIME"
|
||||
PID=`cat ircd.pid`
|
||||
echo "| Process ID: $PID"
|
||||
echo "|----------------------------------------"
|
||||
fi
|
||||
fi
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Kill Script v2.0
|
||||
# Created by Potvin
|
||||
# $Id$
|
||||
DIR=`pwd`
|
||||
DATE=`date +"%a, %b %e %Y"`
|
||||
TIME=`date +"%H:%M:%S %Z"`
|
||||
IRCDPID="ircd.pid"
|
||||
|
||||
if [ ! -r $IRCDPID ]; then
|
||||
clear
|
||||
echo "Could not shut down UnrealIRCd - not running?"
|
||||
echo ""
|
||||
else
|
||||
PID=`cat $IRCDPID`
|
||||
kill -9 $PID >/dev/null 2>&1
|
||||
rm -f $IRCDPID
|
||||
echo "|----------------------------------------"
|
||||
echo "| UnrealIRCD successfully shutdown."
|
||||
echo "| Directory: $DIR"
|
||||
echo "| Date: $DATE"
|
||||
echo "| Time: $TIME"
|
||||
echo "| Process ID: $PID"
|
||||
echo "|----------------------------------------"
|
||||
fi
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Rehash Script v2.0
|
||||
# $Id$
|
||||
|
||||
IRCDPID="ircd.pid"
|
||||
|
||||
if [ ! -r $IRCDPID ]; then
|
||||
clear
|
||||
echo "**** ERROR ****"
|
||||
echo "UnrealIRCd (PID: `cat $IRCDPID`) was not found running, cannot rehash"
|
||||
echo ""
|
||||
else
|
||||
PID=`cat $IRCDPID`
|
||||
kill -HUP $PID
|
||||
echo "|----------------------------------------"
|
||||
echo "| UnrealIRCD successfully rehashed."
|
||||
echo "| Process ID: $PID"
|
||||
echo "|----------------------------------------"
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "start" ] ; then
|
||||
echo "Starting UnrealIRCd"
|
||||
./ircd
|
||||
|
||||
elif [ "$1" = "stop" ] ; then
|
||||
echo "Stopping UnrealIRCd"
|
||||
kill -9 `cat ircd.pid`
|
||||
|
||||
elif [ "$1" = "rehash" ] ; then
|
||||
echo "Rehashing UnrealIRCd"
|
||||
kill -9 `cat ircd.pid`
|
||||
|
||||
else
|
||||
echo "Usage: unreal start|stop|rehash"
|
||||
fi
|
||||
Reference in New Issue
Block a user