]> jfr.im git - irc/unrealircd/unrealircd.git/blame - Config
- Undid that. Version is now 3.3-willneverbereleased.
[irc/unrealircd/unrealircd.git] / Config
CommitLineData
f110f47e 1#!/bin/sh
5b7168d1 2#
3# Config script for UnrealIRCd
4# (C) 2001 The UnrealIRCd Team
5#
6# This configure script is free software; the UnrealIRCd Team gives
7# unlimited permission to copy, distribute and modify as long as the
8# copyright headers stay intact
9#
10#
82c52cb2 11# Rewritten completely to be an interface to autoconf by codemastr
12# This was inspired by the config by Michael Graff (explorer@flame.org)
13# but was written from scratch
14
15# In order to be faster than the old Config, this assumes that all information
16# in the cache file is valid and therefore doesn't check it, so if you messed with
17# default values thats your problem :P
18
cdaaa80c 19# some bits edited by baafie on March 17 2004, every change marked.
20
12eabdba 21
22RUN_CONFIGURE () {
23ARG=""
704b6260
BM
24# Do this even if we're not in advanced mode
25if [ "$SHOWLISTMODES" = "1" ] ; then
26 ARG="$ARG--with-showlistmodes "
27fi
28if [ "$ADVANCED" = "1" ] ; then
29if [ "$TOPICNICKISNUH" = "1" ] ; then
30 ARG="$ARG--with-topicisnuhost "
31fi
32if [ "$SHUNNOTICES" = "1" ] ; then
33 ARG="$ARG--with-shunnotices "
34fi
35if [ "$NOOPEROVERRIDE" = "1" ] ; then
36 ARG="$ARG--with-no-operoverride "
37fi
38if [ "$DISABLEUSERMOD" = "1" ] ; then
39 ARG="$ARG--with-disableusermod "
40fi
41if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
42 ARG="$ARG--with-operoverride-verify "
43fi
2c7a3f2e 44if [ "$DISABLEEXTBANSTACKING" = "1" ]; then
45 ARG="$ARG--with-disable-extendedban-stacking ";
46fi
ca86e3b8 47ARG="$ARG--with-moduleswhich=$MODULESWHICH "
704b6260 48fi
12eabdba 49if [ "$NOSPOOF" = "1" ] ; then
50ARG="$ARG--enable-nospoof "
51fi
52if [ -n "$HUB" ] ; then
53ARG="$ARG--enable-hub "
54fi
55if [ "$CRYPTOIRCD" = "1" ] ; then
06dc8646 56if test x"$SSLDIR" = "x" ; then
12eabdba 57ARG="$ARG--enable-ssl "
06dc8646 58else
59ARG="$ARG--enable-ssl=$SSLDIR "
60fi
61fi
62if [ "$ZIPLINKS" = "1" ] ; then
63if test x"$ZIPLINKSDIR" = "x" ; then
64ARG="$ARG--enable-ziplinks "
65else
66ARG="$ARG--enable-ziplinks=$ZIPLINKSDIR "
67fi
12eabdba 68fi
3be92d02 69if [ "$REMOTEINC" = "1" ] ; then
70ARG="$ARG--enable-libcurl=$CURLDIR "
71fi
d276e9a1 72if [ "$INET6" = "1" ] ; then
73ARG="$ARG--enable-inet6 "
74fi
948b4e61
BM
75if [ "$PREFIXAQ" = "1" ]; then
76ARG="$ARG--enable-prefixaq "
77fi
12eabdba 78ARG="$ARG--with-listen=$LISTEN_SIZE "
79ARG="$ARG--with-dpath=$DPATH "
80ARG="$ARG--with-spath=$SPATH "
81ARG="$ARG--with-nick-history=$NICKNAMEHISTORYLENGTH "
82ARG="$ARG--with-sendq=$MAXSENDQLENGTH "
83ARG="$ARG--with-bufferpool=$BUFFERPOOL "
12eabdba 84ARG="$ARG--with-permissions=$DEFPERM "
85ARG="$ARG--with-fd-setsize=$MAXCONNECTIONS "
86ARG="$ARG--enable-dynamic-linking "
c6e8b4b2 87ARG="$ARG $EXTRAPARA "
12eabdba 88CONF="./configure $ARG"
89echo $CONF
cbdd3138
BM
90$CONF || exit 1
91cd "$UNREALCWD"
12eabdba 92if [ "$CRYPTOIRCD" = "1" ] ; then
93if [ ! -f server.req.pem ]; then
94export OPENSSLPATH
95make pem
96cat .SICI
97read cc
98else
99echo "SSL certificate already existing, no need to regenerate"
100fi
101fi
102}
103
704b6260
BM
104RUN_ADVANCED () {
105TEST=""
106while [ -z "$TEST" ] ; do
107 if [ "$SHOWLISTMODES" = "1" ] ; then
108 TEST="Yes"
109 else
110 TEST="No"
111 fi
112 echo ""
113 echo "Do you want to show the modes a channel has set in the /list output?"
114 echo $n "[$TEST] -> $c"
115 read cc
116 if [ -z "$cc" ] ; then
117 cc=$TEST
118 fi
119 case "$cc" in
120 [Yy]*)
121 SHOWLISTMODES="1"
122 ;;
123 [Nn]*)
124 SHOWLISTMODES=""
125 ;;
126 *)
127 echo ""
128 echo "You must enter either Yes or No"
129 TEST=""
130 ;;
131 esac
132done
133
134TEST=""
135while [ -z "$TEST" ] ; do
136 if [ "$TOPICNICKISNUH" = "1" ] ; then
137 TEST="Yes"
138 else
139 TEST="No"
140 fi
141 echo ""
142 echo "Do you want the /topic command to show the nick!user@host of the person"
143 echo "who set the topic, rather than just the nickname?"
144 echo $n "[$TEST] -> $c"
145 read cc
146 if [ -z "$cc" ] ; then
147 cc=$TEST
148 fi
149 case "$cc" in
150 [Yy]*)
151 TOPICNICKISNUH="1"
152 ;;
153 [Nn]*)
154 TOPICNICKISNUH=""
155 ;;
156 *)
157 echo ""
158 echo "You must enter either Yes or No"
159 TEST=""
160 ;;
161 esac
162done
163
164TEST=""
165while [ -z "$TEST" ] ; do
166 if [ "$SHUNNOTICES" = "1" ] ; then
167 TEST="Yes"
168 else
169 TEST="No"
170 fi
171 echo ""
172 echo "Should Unreal notify a user when they are no longer shunned?"
173 echo $n "[$TEST] -> $c"
174 read cc
175 if [ -z "$cc" ] ; then
176 cc=$TEST
177 fi
178 case "$cc" in
179 [Yy]*)
180 SHUNNOTICES="1"
181 ;;
182 [Nn]*)
183 SHUNNOTICES=""
184 ;;
185 *)
186 echo ""
187 echo "You must enter either Yes or No"
188 TEST=""
189 ;;
190 esac
191done
192
193TEST=""
194while [ -z "$TEST" ] ; do
195 if [ "$NOOPEROVERRIDE" = "1" ] ; then
196 TEST="Yes"
197 else
198 TEST="No"
199 fi
200 echo ""
201 echo "Do you want to disable oper override?"
202 echo $n "[$TEST] -> $c"
203 read cc
204 if [ -z "$cc" ] ; then
205 cc=$TEST
206 fi
207 case "$cc" in
208 [Yy]*)
209 NOOPEROVERRIDE="1"
210 ;;
211 [Nn]*)
212 NOOPEROVERRIDE=""
213 ;;
214 *)
215 echo ""
216 echo "You must enter either Yes or No"
217 TEST=""
218 ;;
219 esac
220done
221
222TEST=""
223while [ -z "$TEST" ] ; do
224 if [ "$DISABLEUSERMOD" = "1" ] ; then
225 TEST="Yes"
226 else
227 TEST="No"
228 fi
229 echo ""
230 echo "Do you want to disable /sethost, /setident, /chgname,"
231 echo "/chghost, and /chgident?"
232 echo $n "[$TEST] -> $c"
233 read cc
234 if [ -z "$cc" ] ; then
235 cc=$TEST
236 fi
237 case "$cc" in
238 [Yy]*)
239 DISABLEUSERMOD="1"
240 ;;
241 [Nn]*)
242 DISABLEUSERMOD=""
243 ;;
244 *)
245 echo ""
246 echo "You must enter either Yes or No"
247 TEST=""
248 ;;
249 esac
250done
251
252TEST=""
253while [ -z "$TEST" ] ; do
254 if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
255 TEST="Yes"
256 else
257 TEST="No"
258 fi
259 echo ""
260 echo "Do you want to require opers to /invite themselves into a +s or +p channel?"
261 echo $n "[$TEST] -> $c"
262 read cc
263 if [ -z "$cc" ] ; then
264 cc=$TEST
265 fi
266 case "$cc" in
267 [Yy]*)
268 OPEROVERRIDEVERIFY="1"
269 ;;
270 [Nn]*)
271 OPEROVERRIDEVERIFY=""
272 ;;
273 *)
274 echo ""
275 echo "You must enter either Yes or No"
276 TEST=""
277 ;;
278 esac
279done
280
2c7a3f2e 281TEST=""
282while [ -z "$TEST" ] ; do
283 if [ "$DISABLEEXTBANSTACKING" = "1" ] ; then
284 TEST="Yes"
285 else
286 TEST="No"
287 fi
288 echo ""
289 echo "Do you want to disable extended ban stacking (~q:~c:#test, etc) support?"
290 echo $n "[$TEST] -> $c"
291 read cc
292 if [ -z "$cc" ] ; then
293 cc=$TEST
294 fi
295 case "$cc" in
296 [Yy]*)
297 DISABLEEXTBANSTACKING="1"
298 ;;
299 [Nn]*)
300 DISABLEEXTBANSTACKING="0"
301 ;;
302 *)
303 echo ""
304 echo "You must enter either Yes or No"
305 TEST=""
306 ;;
307 esac
308done
309
ca86e3b8 310TEST=""
311while [ -z "$TEST" ]; do
312 if [ "$MODULESWHICH" = "onlycommands" ]; then
313 TEST="commands"
314 elif [ "$MODULESWHICH" = "onlymodules" ]; then
315 TEST="modules"
316 else
317 TEST="both"
318 fi
319 echo ""
320 echo "Do you wish to compile commands.so, the m_*.so modules, or both?"
321 echo $n "[$TEST] -> $c"
322 read cc
323 if [ -z "$cc" ]; then
324 cc=$TEST
325 fi
326 case "$cc" in
327 commands|commands.so|onlycommands|commandsonly)
328 MODULESWHICH="onlycommands"
329 ;;
330 modules|m_\*.so|onlymodules|modulesonly)
331 MODULESWHICH="onlymodules"
332 ;;
333 both|commandsandmodules|modulesandcommands)
334 MODULESWHICH="commandsandmodules"
335 ;;
336 *)
337 echo ""
338 echo "Unrecognized response"
339 TEST=""
340 esac
341done
704b6260 342}
82c52cb2 343c=""
344n=""
cbdd3138 345UNREALCWD="`pwd`"
5b7168d1 346NOSPOOF=""
82c52cb2 347DPATH="`pwd`"
d776eb39 348SPATH="`pwd`/src"
5b7168d1 349HUB="1"
82c52cb2 350DEFPERM="0600"
351CRYPTOIRCD=""
06dc8646 352SSLDIR=""
353ZIPLINKS=""
354ZIPLINKSDIR=""
f110f47e 355LISTEN_SIZE="5"
82c52cb2 356NICKNAMEHISTORYLENGTH="2000"
f110f47e 357MAXSENDQLENGTH="3000000"
8a4856fa 358BUFFERPOOL="18"
f110f47e 359MAXCONNECTIONS="1024"
d276e9a1 360INET6=""
3be92d02 361REMOTEINC=""
362CURLDIR=""
cbdd3138 363PREFIXAQ="1"
704b6260
BM
364SHOWLISTMODES="1"
365TOPICNICKISNUH=""
366SHUNNOTICES=""
367NOOPEROVERRIDE=""
368DISABLEUSERMOD=""
369OPEROVERRIDEVERIFY=""
2c7a3f2e 370DISABLEEXTBANSTACKING=""
ca86e3b8 371MODULESWHICH=""
c6e8b4b2 372EXTRAPARA=""
f110f47e 373if [ "`eval echo -n 'a'`" = "-n a" ] ; then
82c52cb2 374 c="\c"
f110f47e 375else
82c52cb2 376 n="-n"
377fi
378
379
380#parse arguments
381NOCACHE=""
382NOINTRO=""
704b6260
BM
383CLEAN=""
384ADVANCED=""
385while [ $# -ge 1 ] ; do
386 if [ $1 = "--help" ] ; then
387 echo "Config utility for UnrealIRCd"
388 echo "-----------------------------"
389 echo "Syntax: ./Config [options]"
390 echo "-nocache Ignore settings saved in config.settings"
391 echo "-nointro Skip intro (release notes, etc)"
392 echo "-quick Skip questions, go straight to configure"
393 echo "-advanced Include additional advanced questions"
394 echo "-clean Clean ./configure cache"
395 exit 0
396 elif [ $1 = "-nocache" ] ; then
397 NOCACHE="1"
398 elif [ $1 = "-nointro" ] ; then
399 NOINTRO="1"
400 elif [ $1 = "-quick" -o $1 = "-q" ] ; then
401 echo "running quick config"
402 if [ -f "config.settings" ] ; then
403 . ./config.settings
404 fi
405 RUN_CONFIGURE
cbdd3138 406 cd "$UNREALCWD"
704b6260
BM
407 exit 0
408 elif [ $1 = "-clean" -o $1 = "-C" ] ; then
409 CLEAN="1"
410 elif [ $1 = "-advanced" ] ; then
411 PREADVANCED="1"
412 fi
413 shift 1
414done
82c52cb2 415
6eb05943 416if [ -f "config.settings" -a -z "$NOCACHE" ] ; then
704b6260 417 . ./config.settings
f110f47e 418fi
419
704b6260
BM
420if [ "$PREADVANCED" = "1" ] ; then
421 ADVANCED="1"
422elif [ "$ADVANCED" = "1" ]; then
423 ADVANCED=""
6eb05943 424fi
425
704b6260
BM
426if [ -n "$CLEAN" ] ; then
427 rm -f config.cache
12eabdba 428fi
429
f110f47e 430clear
431
6eb05943 432 if [ -f ".CHANGES.NEW" -a -z "$NOINTRO" ] ; then
f110f47e 433 more .CHANGES.NEW
82c52cb2 434 echo $n "[Enter to continue]"
f110f47e 435 read cc
760dc8da 436 clear
437 fi
6eb05943 438 if [ -f ".RELEASE.NOTES" -a -z "$NOINTRO" ] ; then
760dc8da 439 more .RELEASE.NOTES
82c52cb2 440 echo $n "[Enter to continue]"
760dc8da 441 read cc
442 clear
f110f47e 443 fi
f110f47e 444
82c52cb2 445TEST=""
446while [ -z "$TEST" ] ; do
447 if [ "$NOSPOOF" = "1" ] ; then
448 TEST="Yes"
f110f47e 449 else
82c52cb2 450 TEST="No"
f110f47e 451 fi
452 echo ""
82c52cb2 453 echo "Many older operating systems have an insecure TCP/IP stack"
454 echo "which may be vulnerable to IP spoofing attacks, if you run"
455 echo "an operating system that is vulnerable to such attacks"
a68898df
BM
456 echo "enable this option. This option can also be useful to prevent"
457 echo "blind proxies from connecting (eg: HTTP POST proxies)."
f110f47e 458 echo ""
a68898df 459 echo "Do you want to enable the server anti-spoof protection?"
82c52cb2 460 echo $n "[$TEST] -> $c"
f110f47e 461 read cc
f110f47e 462 if [ -z "$cc" ] ; then
82c52cb2 463 cc=$TEST
f110f47e 464 fi
465 case "$cc" in
466 [Yy]*)
467 NOSPOOF="1"
468 ;;
469 [Nn]*)
470 NOSPOOF=""
471 ;;
472 *)
473 echo ""
82c52cb2 474 echo "You must enter either Yes or No"
475 TEST=""
f110f47e 476 ;;
477 esac
478done
479
a46aa2a4 480TEST="$DPATH"
481echo ""
d776eb39 482echo "Where do you want to install the server configuration files?"
a46aa2a4 483echo $n "[$TEST] -> $c"
484read cc
485if [ -z "$cc" ] ; then
486 DPATH=$TEST
487else
cdaaa80c 488 DPATH=`eval echo $cc` # modified
a46aa2a4 489fi
f110f47e 490
a46aa2a4 491TEST="$SPATH"
492echo ""
d776eb39 493echo "Where do you want to install the server binary?"
a46aa2a4 494echo $n "[$TEST] -> $c"
495 read cc
496if [ -z "$cc" ] ; then
497 SPATH=$TEST
498else
cdaaa80c 499 SPATH=`eval echo $cc` # modified
a46aa2a4 500fi
f110f47e 501
82c52cb2 502TEST=""
503while [ -z "$TEST" ] ; do
504 if [ "$HUB" = "1" ] ; then
505 TEST="Hub"
f110f47e 506 else
82c52cb2 507 TEST="Leaf"
f110f47e 508 fi
509 echo ""
ee1c5102 510 echo "Would you like to compile as a hub or as a leaf?"
82c52cb2 511 echo "Type Hub to select hub and Leaf to select leaf."
512 echo $n "[$TEST] -> $c"
f110f47e 513 read cc
f110f47e 514 if [ -z "$cc" ] ; then
82c52cb2 515 cc=$TEST
f110f47e 516 fi
517 case "$cc" in
518 [Hh]*)
519 HUB="1"
520 ;;
521 [Ll]*)
522 HUB=""
523 ;;
524 *)
525 echo ""
82c52cb2 526 echo "You must enter either Hub or Leaf"
527 TEST=""
f110f47e 528 ;;
529 esac
530done
531
82c52cb2 532TEST=""
533while [ -z "$TEST" ] ; do
534 TEST="$DEFPERM"
c0a30f63 535 echo ""
82c52cb2 536 echo "What should the default permissions for your configuration files be? (Set this to 0 to disable)"
c0a30f63 537 echo "It is strongly recommended that you use 0600 to prevent unwanted reading of the file"
82c52cb2 538 echo $n "[$TEST] -> $c"
c0a30f63 539 read cc
c0a30f63 540 if [ -z "$cc" ] ; then
82c52cb2 541 DEFPERM=$TEST
542 break
c0a30f63 543 fi
82c52cb2 544 case "$cc" in
545 [0-9]*)
546 DEFPERM="$cc"
547 ;;
548 *)
549 echo ""
550 echo "You must enter a number"
551 TEST=""
552 ;;
553 esac
554
c0a30f63 555done
c0a30f63 556
82c52cb2 557TEST=""
558while [ -z "$TEST" ] ; do
559 if [ "$CRYPTOIRCD" = "1" ] ; then
560 TEST="Yes"
fc26ef3e 561 else
82c52cb2 562 TEST="No"
fc26ef3e 563 fi
564 echo ""
82c52cb2 565 echo "Do you want to support SSL (Secure Sockets Layer) connections?"
566 echo $n "[$TEST] -> $c"
fc26ef3e 567 read cc
fc26ef3e 568 if [ -z "$cc" ] ; then
82c52cb2 569 cc=$TEST
fc26ef3e 570 fi
571 case "$cc" in
572 [Yy]*)
573 CRYPTOIRCD="1"
fc26ef3e 574 ;;
575 [Nn]*)
576 CRYPTOIRCD=""
577 ;;
578 *)
579 echo ""
82c52cb2 580 echo "You must enter either Yes or No"
581 TEST=""
fc26ef3e 582 ;;
583 esac
584done
fc26ef3e 585
06dc8646 586if [ "$CRYPTOIRCD" = "1" ] ; then
f21c3384 587TEST="$SSLDIR"
06dc8646 588echo ""
589echo "If you know the path to OpenSSL on your system, enter it here. If not"
590echo "leave this blank"
591echo $n "[$TEST] -> $c"
592 read cc
593if [ -z "$cc" ] ; then
f21c3384 594 SSLDIR="$TEST"
06dc8646 595else
cdaaa80c 596 SSLDIR=`eval echo $cc` # modified
06dc8646 597fi
598fi
599
d276e9a1 600TEST=""
601while [ -z "$TEST" ] ; do
602 if [ "$INET6" = "1" ] ; then
603 TEST="Yes"
604 else
605 TEST="No"
606 fi
607 echo ""
608 echo "Do you want to enable IPv6 support?"
609 echo $n "[$TEST] -> $c"
610 read cc
611 if [ -z "$cc" ] ; then
612 cc=$TEST
613 fi
614 case "$cc" in
615 [Yy]*)
616 INET6="1"
617 ;;
618 [Nn]*)
619 INET6=""
620 ;;
621 *)
622 echo ""
623 echo "You must enter either Yes or No"
624 TEST=""
625 ;;
626 esac
627done
628
06dc8646 629TEST=""
630while [ -z "$TEST" ] ; do
631 if [ "$ZIPLINKS" = "1" ] ; then
632 TEST="Yes"
633 else
634 TEST="No"
635 fi
636 echo ""
637 echo "Do you want to enable ziplinks support?"
638 echo $n "[$TEST] -> $c"
639 read cc
640 if [ -z "$cc" ] ; then
641 cc=$TEST
642 fi
643 case "$cc" in
644 [Yy]*)
645 ZIPLINKS="1"
646 ;;
647 [Nn]*)
648 ZIPLINKS=""
649 ;;
650 *)
651 echo ""
652 echo "You must enter either Yes or No"
653 TEST=""
654 ;;
655 esac
656done
657
658if [ "$ZIPLINKS" = "1" ] ; then
f21c3384 659TEST="$ZIPLINKSDIR"
06dc8646 660echo ""
661echo "If you know the path to zlib on your system, enter it here. If not"
662echo "leave this blank"
663echo $n "[$TEST] -> $c"
664 read cc
665if [ -z "$cc" ] ; then
f21c3384 666 ZIPLINKSDIR="$TEST"
06dc8646 667else
cdaaa80c 668 ZIPLINKSDIR=`eval echo $cc` # modified
06dc8646 669fi
670fi
671
3be92d02 672TEST=""
673while [ -z "$TEST" ] ; do
674 if [ "$REMOTEINC" = "1" ] ; then
675 TEST="Yes"
676 else
677 TEST="No"
678 fi
679 echo ""
680 echo "Do you want to enable remote includes?"
681 echo $n "[$TEST] -> $c"
682 read cc
683 if [ -z "$cc" ] ; then
684 cc=$TEST
685 fi
686 case "$cc" in
687 [Yy]*)
688 REMOTEINC="1"
689 ;;
690 [Nn]*)
691 REMOTEINC=""
10aa5e99 692 CURLDIR=""
3be92d02 693 ;;
694 *)
695 echo ""
696 echo "You must enter either Yes or No"
697 TEST=""
698 ;;
699 esac
700done
701
702if [ "$REMOTEINC" = "1" ] ; then
703 TEST=""
704 while [ -z "$TEST" ] ; do
10aa5e99 705 TEST="$CURLDIR"
3be92d02 706 echo ""
707 echo "Specify the directory you installed libcurl to"
708 echo $n "[$TEST] -> $c"
709 read cc
710 if [ -z "$cc" ] ; then
10aa5e99 711 cc=$TEST
3be92d02 712 else
713 TEST=$cc
cdaaa80c 714 CURLDIR=`eval echo $cc` # modified
3be92d02 715 fi
716 done
717fi
718
719
948b4e61
BM
720TEST=""
721while [ -z "$TEST" ] ; do
722 if [ "$PREFIXAQ" = "1" ] ; then
723 TEST="Yes"
724 else
725 TEST="No"
726 fi
727 echo ""
728 echo "Do you want to enable prefixes for chanadmin and chanowner?"
729 echo "This will give +a the & prefix and ~ for +q (just like +o is @)"
cbdd3138
BM
730 echo "Supported by the major clients (mIRC, xchat, epic, eggdrop, Klient,"
731 echo "PJIRC, irssi, CGI:IRC, etc.)"
948b4e61
BM
732 echo "This feature should be enabled/disabled network-wide."
733 echo $n "[$TEST] -> $c"
734 read cc
735 if [ -z "$cc" ] ; then
736 cc=$TEST
737 fi
738 case "$cc" in
739 [Yy]*)
740 PREFIXAQ="1"
741 ;;
742 [Nn]*)
743 PREFIXAQ=""
744 ;;
745 *)
746 echo ""
747 echo "You must enter either Yes or No"
748 TEST=""
749 ;;
750 esac
751done
752
753
82c52cb2 754TEST=""
755while [ -z "$TEST" ] ; do
756 TEST="$LISTEN_SIZE"
f110f47e 757 echo ""
82c52cb2 758 echo "What listen() backlog value do you wish to use? Some older servers"
759 echo "have problems with more than 5, others work fine with many more."
760 echo $n "[$TEST] -> $c"
f110f47e 761 read cc
f110f47e 762 if [ -z "$cc" ] ; then
82c52cb2 763 LISTEN_SIZE=$TEST
764 break
f110f47e 765 fi
766 case "$cc" in
767 [1-9]*)
768 LISTEN_SIZE="$cc"
769 ;;
770 *)
771 echo ""
82c52cb2 772 echo "You must enter a number"
773 TEST=""
f110f47e 774 ;;
775 esac
776done
777
82c52cb2 778TEST=""
779while [ -z "$TEST" ] ; do
780 TEST="$NICKNAMEHISTORYLENGTH"
f110f47e 781 echo ""
782 echo "How far back do you want to keep the nickname history?"
82c52cb2 783 echo $n "[$TEST] -> $c"
f110f47e 784 read cc
f110f47e 785 if [ -z "$cc" ] ; then
82c52cb2 786 NICKNAMEHISTORYLENGTH=$TEST
787 break
f110f47e 788 fi
789 case "$cc" in
790 [1-9]*)
791 NICKNAMEHISTORYLENGTH="$cc"
792 ;;
793 *)
794 echo ""
82c52cb2 795 echo "You must enter a number"
796 TEST=""
f110f47e 797 ;;
798 esac
799done
800
82c52cb2 801TEST=""
802while [ -z "$TEST" ] ; do
803 TEST="$MAXSENDQLENGTH"
f110f47e 804 echo ""
82c52cb2 805 echo "What is the maximum sendq length you wish to have?"
806 echo $n "[$TEST] -> $c"
f110f47e 807 read cc
f110f47e 808 if [ -z "$cc" ] ; then
82c52cb2 809 MAXSENDQLENGTH=$TEST
810 break
f110f47e 811 fi
812 case "$cc" in
82c52cb2 813 [1-9][0-9][0-9][0-9]*)
f110f47e 814 MAXSENDQLENGTH="$cc"
815 ;;
816 *)
817 echo ""
82c52cb2 818 echo "You must enter a number greater than or equal to 1000"
819 TEST=""
f110f47e 820 ;;
821 esac
822done
823
82c52cb2 824TEST=""
825while [ -z "$TEST" ] ; do
826 TEST="$BUFFERPOOL"
f110f47e 827 echo ""
5b7168d1 828 echo "How many buffer pools would you like?"
82c52cb2 829 echo "This number will be multiplied by MAXSENDQLENGTH."
830 echo $n "[$TEST] -> $c"
f110f47e 831 read cc
f110f47e 832 if [ -z "$cc" ] ; then
82c52cb2 833 BUFFERPOOL=$TEST
834 break
f110f47e 835 fi
836 case "$cc" in
82c52cb2 837 [1-9]*)
ee1c5102 838 BUFFERPOOL="$cc"
f110f47e 839 ;;
82c52cb2 840 *)
841 echo ""
842 echo "You must enter a number"
843 TEST=""
844 ;;
f110f47e 845 esac
82c52cb2 846
f110f47e 847done
ee1c5102 848
a75432c9 849echo ""
82c52cb2 850TEST=""
851while [ -z "$TEST" ] ; do
852 TEST="$MAXCONNECTIONS"
f110f47e 853 echo ""
82c52cb2 854 echo "How many file descriptors (or sockets) can the IRCd use?"
855 echo $n "[$TEST] -> $c"
f110f47e 856 read cc
f110f47e 857 if [ -z "$cc" ] ; then
82c52cb2 858 MAXCONNECTIONS=$TEST
859 break
f110f47e 860 fi
861 case "$cc" in
862 [1-9][0-9][0-9]*)
863 MAXCONNECTIONS="$cc"
864 ;;
865 *)
866 echo ""
82c52cb2 867 echo "You must to enter a number greater than or equal to 100"
868 TEST=""
f110f47e 869 ;;
870 esac
871done
704b6260
BM
872if [ -n "$ADVANCED" ] ; then
873 RUN_ADVANCED
874fi
c6e8b4b2 875echo ""
876echo "Would you like any more parameters to configure?"
877echo "Write them here:"
878echo $n "[]-> $c"
879read EXTRAPARA
880
82c52cb2 881rm -f config.settings
882cat > config.settings << __EOF__
f110f47e 883#
f110f47e 884NOSPOOF="$NOSPOOF"
f110f47e 885DPATH="$DPATH"
886SPATH="$SPATH"
d276e9a1 887INET6="$INET6"
948b4e61 888PREFIXAQ="$PREFIXAQ"
f110f47e 889LISTEN_SIZE="$LISTEN_SIZE"
890MAXSENDQLENGTH="$MAXSENDQLENGTH"
891BUFFERPOOL="$BUFFERPOOL"
892MAXCONNECTIONS="$MAXCONNECTIONS"
893NICKNAMEHISTORYLENGTH="$NICKNAMEHISTORYLENGTH"
894HUB="$HUB"
c0a30f63 895DEFPERM="$DEFPERM"
d269e1a8 896CRYPTOIRCD="$CRYPTOIRCD"
06dc8646 897SSLDIR="$SSLDIR"
898ZIPLINKS="$ZIPLINKS"
899ZIPLINKSDIR="$ZIPLINKSDIR"
3be92d02 900REMOTEINC="$REMOTEINC"
901CURLDIR="$CURLDIR"
704b6260
BM
902SHOWLISTMODES="$SHOWLISTMODES"
903TOPICNICKISNUH="$TOPICNICKISNUH"
904SHUNNOTICES="$SHUNNOTICES"
905NOOPEROVERRIDE="$NOOPEROVERRIDE"
906DISABLEUSERMOD="$DISABLEUSERMOD"
907OPEROVERRIDEVERIFY="$OPEROVERRIDEVERIFY"
2c7a3f2e 908DISABLEEXTBANSTACKING="$DISABLEEXTBANSTACKING"
ca86e3b8 909MODULESWHICH="$MODULESWHICH"
c6e8b4b2 910EXTRAPARA="$EXTRAPARA"
704b6260 911ADVANCED="$ADVANCED"
f110f47e 912__EOF__
12eabdba 913RUN_CONFIGURE
cbdd3138 914cd "$UNREALCWD"
f110f47e 915cat << __EOF__
916
82c52cb2 917 _______________________________________________________________________
918| |
919| UnrealIRCd Compile-Time Config |
920|_______________________________________________________________________|
921|_______________________________________________________________________|
922| |
923| Now all you have to do is type 'make' and let it compile. When that's |
924| done, you will receive other instructions on what to do next. |
925| |
926|_______________________________________________________________________|
927|_______________________________________________________________________|
928| - The UnrealIRCd Team - |
929| |
930| * Stskeeps stskeeps@unrealircd.com |
931| * codemastr codemastr@unrealircd.com |
ae68ad49 932| * Syzop syzop@unrealircd.com |
82c52cb2 933|_______________________________________________________________________|
f110f47e 934__EOF__
06dc8646 935