forked from UndernetIRC/ircu2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcfg-hispano.sh
executable file
·70 lines (62 loc) · 1.35 KB
/
cfg-hispano.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#! /bin/sh
echo "IRC-Hispano IRCD"
echo ""
echo "Configuracion del IRC Daemon de IRC-Hispano..."
echo ""
PREFIX="none"
BINDIR="none"
SYSCONFDIR="none"
DATADIR="none"
if [ x"$2" = x ]
then
echo "Uso $0 {PRO|DESA|MANUAL} usuarios [prefijo ruta]"
echo " En PRO se instala en /usr/local/ircd/"
echo " En DESA se instala en $HOME/bin/ircd"
echo " En MANUAL se instala en la ruta especificada"
exit 1
fi
if [ "$1" = "PRO" ]; then
PREFIX="/usr/local/ircd"
BINDIR="/usr/local/ircd"
SYSCONFDIR="/usr/local/ircd"
DATADIR="/usr/local/ircd"
elif [ "$1" = "DESA" ]; then
if [ $USER = "root" ]; then
PREFIX="/root"
BINDIR="/bin"
SYSCONFDIR="/etc/ircd"
DATADIR="/usr/share/ircd"
else
PREFIX="$HOME/bin/ircd"
BINDIR="$HOME/bin/ircd"
SYSCONFDIR="$HOME/bin/ircd"
DATADIR="$HOME/bin/ircd"
fi
elif [ "$1" = "MANUAL" ]; then
if [ x"$3" = x ]
then
echo "Falta la ruta de instalacion";
exit 1
else
PREFIX=$3
BINDIR=$3
SYSCONFDIR=$3
DATADIR=$3
fi
else
echo "Opcion $1 desconocida";
exit 1
fi
#echo Generando Configure y Makefile
if [ ! -f configure ];
then
echo Generando Configure y Makefile
sh autogen.sh
fi
echo Configurando IRCh
./configure --prefix=$PREFIX --bindir=$BINDIR --sysconfdir=$SYSCONFDIR --datadir=$DATADIR \
--with-maxcon=$2 \
--enable-pcre \
--with-ddb-environment
echo ""
exit 0