- Create user "bot" und domain "bot.domain.net" with plexx/confix.
- As root, change into the directory of the user "bot".
cd /var/www/vhosts/bot.domain.net/
- Create a new directoty only for iroffer.
mkdir iroffer
cd iroffer/
- Get the sources for the program.
wget https://iroffer.net/iroffer-dinoex-snap.tar.gz
- Extract the sources.
tar -xvzf iroffer-dinoex-snap.tar.gz
- We configure the sources for our Linux version.
cd iroffer-dinoex-snap
./Configure -curl -geoip -ruby
- Should "Configure" report some errors, we have to retry after installing the missing packages.
Sufficient under Debian:
apt-get install make
apt-get install gcc
apt-get install libc-dev
apt-get install libcurl4-openssl-dev
apt-get install libmaxminddb-dev
apt-get install libssl-dev
apt-get install libminiupnpc-dev
apt-get install ruby-dev
apt-get install ruby
- We build the program.
make
- Now we copy the program to the right place.
cp -p iroffer ..
- We start with the "sample.config.
cp sample.config ../mybot.config
cd ..
chown bot mybot.config
chmod 600 mybot.config
- Only the bot needs to have write permissions here.
cd ..
chown bot .
chmod 700 .
- We create a password for the admin-chat.
./iroffer -c mybot.config
- We add the directories to the configuration file "mybot.config".
"adminhost" should be set to your hostmask.
We set the path for "mybot.state" and "mybot.txt" so the weblist can access them.
The directories for the files are added and we use it also for uploads.
mybot.config should include:
logfile /iroffer/mybot.log
pidfile /iroffer/mybot.pid
statefile /httpdocs/mybot.state
xdcclistfile /httpdocs/mybot.txt
filedir /files
uploaddir /files
- We create the directory for the files.
cd ..
mkdir files
chown bot files
Here we can upload the files with FTP or with XDCC later.
- Download the source of the weblist.
wget https://iroffer.net/iroffer-state219.zip
cd httpdocs
unzip ../iroffer-state219.zip
touch size.data
cp iroffer-sample.php index.php
- Edit the configuration of the weblist.
nano -w index.php
or
vim index.php
In the file index.php you define und 2) one line with the nickname of your bot:
# 2) Set nickname by hand
#$nick = 'XDCC|irofferbot';
$nick = 'XDCC|mybot';
- We create a startup script.
cd ..
then
nano -w start-iroffer.sh
or
vim start-iroffer.sh
Here we add the following lines:
#!/bin/sh
cd iroffer
./iroffer -b -u bot -t /var/www/vhosts/bot.domain.net /iroffer/mybot.config
- Make the script executeable.
chmod +x start-iroffer.sh
- Start.
sh start-iroffer.sh
Now the bot should run and connect.
- If iroffer fails to resolve the DNS name of the IRC server inside your chroot:
mkdir /var/www/vhosts/bot.domain.net/etc
cp -p /etc/resolv.conf /etc/nsswitch.conf /var/www/vhosts/bot.domain.net/etc/
mkdir /var/www/vhosts/bot.domain.net/lib
cp -p /lib/libnss_dns.so.2 /lib/libresolv.so.2 /var/www/vhosts/bot.domain.net/lib/
The bot don't have to be restarted to connect.