Code: Select all
sdays@Mars ~/eggdrop1.6.18
./start.sh
: command not found
: command not found:
: command not found:
: command not found:
./start.sh: line 219: syntax error: unexpected end of file
Code: Select all
#!/bin/sh
#start.sh
#See Readme for more info.
#By: mekk and thermo
#Edit these:
suser="sdays"
bname="botnet"
hpass="******"
lpass="*****"
mchan="#"
###################################################################################
PWD="`/bin/pwd`"
if test "$suser" = "your-superuser"
then
echo "You need to edit the top of start.sh."
exit 0
fi
if test "$mchan" = "your-mainchannel"
then
echo "You need to edit the top of start.sh."
exit 0
fi
clear
echo "start.sh - v1.9"
echo "By: mekk and thermo"
echo
if [ -f eggdrop ]
then
echo "Edge has already been compiled on this shell."
echo -n "Do you want to make a bot? [y/n]: "
read ans
if test "$ans" = "y"
then
skip=yes
else
exit 0
fi
fi
if [ ! "$skip" = "yes" ]
then
echo "Configuring..."
./configure
make eggdrop
if [ ! -f eggdrop ]
then
echo
echo "Compile or Configure errored!"
echo "See Readme for more help and contact information."
exit 1
fi
rm -rf conf* Make* lush* EGGDROP.stamp src
echo "done!"
echo "Setting up the go file..."
echo "#This script launches the bot(s)" > go
echo "#Made from start.sh" >> go
echo " " >> go
echo "botdir=\"$PWD\"" >> go
echo " " >> go
echo "cd \$botdir" >> go
echo " " >> go
echo "for script in *.conf" >> go
echo "do" >> go
echo "if [ ! -r \$script ]" >> go
echo " then continue" >> go
echo "fi" >> go
echo "botname=\`echo \$script | cut -d. -f1\`" >> go
echo "if [ -r pid.\$botname ]" >> go
echo " then" >> go
echo " botpid=\`cat pid.\$botname\`" >> go
echo " if \`kill -CHLD \$botpid >/dev/null 2>&1\`" >> go
echo " then" >> go
echo " continue" >> go
echo " fi" >> go
echo " rm -f pid.\$botname" >> go
echo "fi" >> go
echo "./eggdrop \$script" >> go
echo "done" >> go
chmod 700 go
echo "done!"
echo "Setting up Crontab..."
echo -n "Do you want crontab? [y/n]: "
read cron
if test "$cron" = "y"
then
echo "0,10,20,30,40,50 * * * * * $PWD/go > /dev/null 2>1&" > cron
crontab cron
echo "done!"
else
echo "done!"
fi
fi
ans2="y"
while [ $ans2 = "y" ]
do
echo "Making config..."
echo -n "Botnick: "
read bot
echo -n "User Name: "
read username
echo -n "Real Name: "
read realname
echo -n "Vhost: "
read vhost
echo -n "Ip: "
read ip
echo -n "Bot Port: "
read bport
echo -n "User Port: "
read uport
echo -n "Is this a hub? [y/n]: "
read ans3
if test "$ans3" = "y"
then
hub="1"
passive="0"
else
hub="0"
passive="1"
fi
cat >> "$bot.conf" << EOF
#edge config from start.sh
#Bot: $bot
#Made: `date`
set nick "$bot"
set altnick "$bot|"
set username "$username"
set realname "$realname"
set my-hostname "$vhost"
set my-ip "$ip"
set hub "$hub"
set passive "$passive"
set superuser "$suser"
set botnet "$bname"
set hubpw "$hpass"
set leafpw "$lpass"
listen $bport bots
listen $uport users
set cchan "$mchan"
set servers {
efnet.cs.hut.fi
efnet.demon.co.uk
efnet.skynet.be
efnet.vuurwerk.nl
irc.Prison.NET
irc.Qeast.net
irc.arcti.ca
irc.concentric.net
irc.daxnet.no
irc.du.se
irc.easynews.com
irc.efnet.pl
irc.flamed.net
irc.hemmet.chalmers.se
irc.homelien.no
irc.inet.tele.dk
irc.inter.net.il
irc.isdnet.fr
irc.lagged.org
irc.lightning.net
irc.mindspring.com
irc.rt.ru
irc.secsup.uu.net
irc.torix.ca
irc.umich.edu
irc.umn.edu
irc.vrfx.com
irc.webgiro.se
irc.weblook2k.com
irc2.flamed.net
ircd.Qeast.net
ircd.arcti.ca
ircd.charter.com
ircd.flamed.net
ircd.lightning.net
ircd.secsup.org
ircd.torix.ca
}
channel add $mchan {chanmode "+stn"}
channel set $mchan -clearbans -bitch -greet -protectops -stopnethack
channel set $mchan -revenge -secret +shared
source scripts/edge.tcl
EOF
echo "done!"
echo
echo -n "Make another bot? [y/n]: "
read ans2
done
echo
echo "Install script finshed!"
if [ -e $bot.u ]
then
echo "User file found."
echo "Running go script..."
./go
else
echo "No user file found. When the bot comes on /msg $bot hello to add your self."
echo "Running bot with out userfile..."
./eggdrop -m $bot.conf
fi
exit 0