1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 20:33:13 +02:00

Fix whitespace in ./Config

Indent properly and use tabs, not spaces.
Hopefully not breaking anything in the process....
This commit is contained in:
Bram Matthys
2020-11-13 19:28:22 +01:00
parent e48cf87d52
commit ecabef1654
+256 -259
View File
@@ -104,58 +104,59 @@ fi
echo $CONF
$CONF || exit 1
cd "$UNREALCWD"
if [ "$QUICK" != "1" ] ; then
if [ ! -f $CONFDIR/tls/server.cert.pem -a ! -f $CONFDIR/ssl/server.cert.pem ]; then
export OPENSSLPATH
TEST=""
while [ -z "$TEST" ] ; do
if [ "$GENCERTIFICATE" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "UnrealIRCd requires an SSL certificate in order to work."
echo "Do you want to generate an SSL certificate for the IRCd?"
echo "Only answer No if you already have one."
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
GENCERTIFICATE="1"
;;
[Nn]*)
GENCERTIFICATE=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
if [ "$GENCERTIFICATE" = 1 ]; then
echo
echo "*******************************************************************************"
echo "Next you will be asked some questions in order to generate the SSL certificate."
echo "IMPORTANT: If you don't own a domain or don't know what to answer, then you can"
echo " simply press ENTER or use fictional names for each question!"
echo "*******************************************************************************"
echo "Press ENTER to continue"
read cc
make pem
echo "Certificate created successfully."
sleep 1
else
echo "Ok, not generating SSL certificate. Make sure that the certificate and key"
echo "are installed in conf/tls/server.cert.pem and conf/tls/server.key.pem prior to starting the IRCd."
fi
else
echo "SSL certificate already exists in configuration directory, no need to regenerate."
fi
if [ "$QUICK" != "1" ] ; then
if [ ! -f $CONFDIR/tls/server.cert.pem -a ! -f $CONFDIR/ssl/server.cert.pem ]; then
export OPENSSLPATH
TEST=""
while [ -z "$TEST" ] ; do
if [ "$GENCERTIFICATE" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "UnrealIRCd requires an SSL certificate in order to work."
echo "Do you want to generate an SSL certificate for the IRCd?"
echo "Only answer No if you already have one."
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
GENCERTIFICATE="1"
;;
[Nn]*)
GENCERTIFICATE=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
if [ "$GENCERTIFICATE" = 1 ]; then
echo
echo "*******************************************************************************"
echo "Next you will be asked some questions in order to generate the SSL certificate."
echo "IMPORTANT: If you don't own a domain or don't know what to answer, then you can"
echo " simply press ENTER or use fictional names for each question!"
echo "*******************************************************************************"
echo "Press ENTER to continue"
read cc
make pem
echo "Certificate created successfully."
sleep 1
else
echo "Ok, not generating SSL certificate. Make sure that the certificate and key"
echo "are installed in conf/tls/server.cert.pem and conf/tls/server.key.pem prior to starting the IRCd."
fi
else
echo "SSL certificate already exists in configuration directory, no need to regenerate."
fi
fi
# Silently force a 'make clean' as otherwise part (or whole) of the
@@ -167,89 +168,89 @@ make clean 1>/dev/null 2>&1
RUN_ADVANCED () {
TEST=""
while [ -z "$TEST" ] ; do
if [ "$SHOWLISTMODES" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to show the modes a channel has set in the /list output?"
echo $n "[$TEST] -> $c"
if [ "$SHOWLISTMODES" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to show the modes a channel has set in the /list output?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
SHOWLISTMODES="1"
;;
SHOWLISTMODES="1"
;;
[Nn]*)
SHOWLISTMODES=""
;;
SHOWLISTMODES=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
TEST=""
while [ -z "$TEST" ] ; do
if [ "$NOOPEROVERRIDE" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to disable oper override?"
echo $n "[$TEST] -> $c"
if [ "$NOOPEROVERRIDE" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to disable oper override?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
NOOPEROVERRIDE="1"
;;
NOOPEROVERRIDE="1"
;;
[Nn]*)
NOOPEROVERRIDE=""
;;
NOOPEROVERRIDE=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
TEST=""
while [ -z "$TEST" ] ; do
if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to require opers to /invite themselves into a +s or +p channel?"
echo $n "[$TEST] -> $c"
if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to require opers to /invite themselves into a +s or +p channel?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
OPEROVERRIDEVERIFY="1"
;;
OPEROVERRIDEVERIFY="1"
;;
[Nn]*)
OPEROVERRIDEVERIFY=""
;;
OPEROVERRIDEVERIFY=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
}
@@ -270,9 +271,9 @@ OPEROVERRIDEVERIFY=""
GENCERTIFICATE="1"
EXTRAPARA=""
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
c="\c"
c="\c"
else
n="-n"
n="-n"
fi
@@ -323,13 +324,13 @@ fi
clear
if [ -f "doc/Config.header" -a -z "$NOINTRO" ] ; then
more doc/Config.header
echo ""
echo $n "[Press Enter to continue]"
read cc
clear
fi
if [ -f "doc/Config.header" -a -z "$NOINTRO" ] ; then
more doc/Config.header
echo ""
echo $n "[Press Enter to continue]"
read cc
clear
fi
echo "We will now ask you a number of questions. You can just press ENTER to accept the defaults!"
echo ""
@@ -414,9 +415,9 @@ echo " If this directory does not exist it will be created.)"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
BASEPATH=$TEST
BASEPATH=$TEST
else
BASEPATH=`eval echo $cc` # modified
BASEPATH=`eval echo $cc` # modified
fi
if [ "$BASEPATH" = "$UNREALCWD" ]; then
echo ""
@@ -440,32 +441,28 @@ PRIVATELIBDIR="$BASEPATH/lib"
TEST=""
while [ -z "$TEST" ] ; do
TEST="$DEFPERM"
echo ""
echo "What should the default permissions for your configuration files be? (Set this to 0 to disable)"
echo "It is strongly recommended that you use 0600 to prevent unwanted reading of the file"
echo $n "[$TEST] -> $c"
TEST="$DEFPERM"
echo ""
echo "What should the default permissions for your configuration files be? (Set this to 0 to disable)"
echo "It is strongly recommended that you use 0600 to prevent unwanted reading of the file"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
DEFPERM=$TEST
break
fi
case "$cc" in
if [ -z "$cc" ] ; then
DEFPERM=$TEST
break
fi
case "$cc" in
[0-9]*)
DEFPERM="$cc"
;;
DEFPERM="$cc"
;;
*)
echo ""
echo "You must enter a number"
TEST=""
;;
esac
echo ""
echo "You must enter a number"
TEST=""
;;
esac
done
echo ""
echo "If you want, you can manually enter the path to OpenSSL/LibreSSL here."
echo "In most cases you can leave this blank and it will be detected automatically."
@@ -484,43 +481,43 @@ fi
TEST="$SSLDIR"
echo $n "[$TEST] -> $c"
read cc
read cc
if [ -z "$cc" ] ; then
SSLDIR="$TEST"
SSLDIR="$TEST"
else
SSLDIR=`eval echo $cc` # modified
SSLDIR=`eval echo $cc` # modified
fi
TEST=""
while [ -z "$TEST" ] ; do
if [ "$REMOTEINC" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to enable remote includes?"
echo "This allows stuff like this in your configuration file:"
echo "include \"https://www.somesite.org/files/opers.conf\";"
echo $n "[$TEST] -> $c"
if [ "$REMOTEINC" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to enable remote includes?"
echo "This allows stuff like this in your configuration file:"
echo "include \"https://www.somesite.org/files/opers.conf\";"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
REMOTEINC="1"
;;
REMOTEINC="1"
;;
[Nn]*)
REMOTEINC=""
CURLDIR=""
;;
REMOTEINC=""
CURLDIR=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
if [ "$REMOTEINC" = "1" ] ; then
@@ -598,108 +595,108 @@ if [ "$REMOTEINC" = "1" ] ; then
fi
fi
if [ "x$CURLDIR" = "x" ]; then
# Still empty?
TEST=""
while [ -z "$TEST" ] ; do
TEST="Yes"
echo ""
echo "Do you want me to automatically download and install curl for you?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
INSTALLCURL="1"
CURLDIR="$UNREALCWD/extras/curl"
;;
[Nn]*)
INSTALLCURL="0"
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
fi
if [ "x$CURLDIR" = "x" ]; then
# Still empty?
TEST=""
while [ -z "$TEST" ] ; do
TEST="Yes"
echo ""
echo "Do you want me to automatically download and install curl for you?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
INSTALLCURL="1"
CURLDIR="$UNREALCWD/extras/curl"
;;
[Nn]*)
INSTALLCURL="0"
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
fi
if [ "$INSTALLCURL" != "1" ]; then
TEST=""
while [ -z "$TEST" ] ; do
TEST="$CURLDIR"
echo ""
echo "Specify the directory you installed libcurl to"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
else
TEST=$cc
CURLDIR=`eval echo $cc` # modified
fi
done
fi
TEST=""
while [ -z "$TEST" ] ; do
TEST="$CURLDIR"
echo ""
echo "Specify the directory you installed libcurl to"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
else
TEST=$cc
CURLDIR=`eval echo $cc` # modified
fi
done
fi
fi
TEST=""
while [ -z "$TEST" ] ; do
if [ "$PREFIXAQ" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to enable prefixes for chanadmin and chanowner?"
echo "This will give +a the & prefix and ~ for +q (just like +o is @)"
echo "Supported by the major clients (mIRC, xchat, epic, eggdrop, Klient,"
echo "PJIRC, irssi, CGI:IRC, etc.)"
echo "This feature should be enabled/disabled network-wide."
echo $n "[$TEST] -> $c"
if [ "$PREFIXAQ" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to enable prefixes for chanadmin and chanowner?"
echo "This will give +a the & prefix and ~ for +q (just like +o is @)"
echo "Supported by the major clients (mIRC, xchat, epic, eggdrop, Klient,"
echo "PJIRC, irssi, CGI:IRC, etc.)"
echo "This feature should be enabled/disabled network-wide."
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
PREFIXAQ="1"
;;
PREFIXAQ="1"
;;
[Nn]*)
PREFIXAQ=""
;;
PREFIXAQ=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
TEST=""
while [ -z "$TEST" ] ; do
TEST="$NICKNAMEHISTORYLENGTH"
echo ""
echo "How far back do you want to keep the nickname history?"
echo $n "[$TEST] -> $c"
TEST="$NICKNAMEHISTORYLENGTH"
echo ""
echo "How far back do you want to keep the nickname history?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
NICKNAMEHISTORYLENGTH=$TEST
break
fi
case "$cc" in
if [ -z "$cc" ] ; then
NICKNAMEHISTORYLENGTH=$TEST
break
fi
case "$cc" in
[1-9]*)
NICKNAMEHISTORYLENGTH="$cc"
;;
NICKNAMEHISTORYLENGTH="$cc"
;;
*)
echo ""
echo "You must enter a number"
TEST=""
;;
esac
echo ""
echo "You must enter a number"
TEST=""
;;
esac
done
echo ""
@@ -746,7 +743,7 @@ echo "Otherwise, see \`./configure --help' and write them here:"
echo $n "[$TEST] -> $c"
read EXTRAPARA
if [ -z "$EXTRAPARA" ]; then
EXTRAPARA="$TEST"
EXTRAPARA="$TEST"
fi
rm -f config.settings