Ubuntu eggdrop sysinfo

First we need sensors
apt-get install lm-sensors
sensors-detect
Answer as sensible as possible (defsaults will do) then test it:
sensors
This page explains how to get system information to IRC
First we need eggdrop:
sudo apt-get install eggdrop
cd /usr/lib/eggdrop
sudo chmod 777 modules -R
wget http://www.egghelp.org/files/conf/simple.conf.gz
gunzip simple.conf.gz
nano simple.conf
change the botowner, nick, server and channel info.
We also need to call the sysinfo.tcl
# TCL scripts - specify any TCL scripts you wish to load.
source scripts/sysinfo.tcl
make the scripts folder executable and get the scripts
mkdir scripts
cd scripts
wget http://imbezol.org/sysinfo/sysinfo281.21.pl
wget http://www.bluedevil.ca/eggdrop/sysinfo1.15.tar.bz2
tar xvf sysinfo1.15.tar.bz2
chmod +x ../scripts -R
remove: set sys_flag ""
We also change the bash file: sysinfo.sh
#!/bin/bash
SYSINFO=$(/usr/lib/eggdrop/scripts/sysinfo281.21.pl 2> /dev/null)
EXT_IP=$(wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//')
INT_IP=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
TEMPER=$(sensors | grep 'Core 0')
echo "local-ip: $INT_IP external-ip: $EXT_IP $SYSINFO $TEMPER"
If you don't have sensors installed do so or remove that line
It's time to test (cross fingers)
cd /usr/lib/eggdrop
eggdrop -m simple.conf
Log into IRC with your username and tell the bot:
/msg yourbotname HELLO
It asks you to set password.
Killing it:
kill -9 $(cat pid.*)
Starting it:
eggdrop simple.conf
Now we want to deamonize the script
sudo nano /etc/init.d/eggbot
and add: #!/bin/sh Echo "Starting Eggdrop IRC bot..." cd /usr/lib/eggdrop sudo -u username eggdrop /home/username/simple.conf

 

Hessen Kasselstraat 8
5615 SM Eindhoven
phone: +316-81888456