First we need sensors
Answer as sensible as possible (defsaults will do) then test it:
This page explains how to get system information to IRC
First we need eggdrop:
change the botowner, nick, server and channel info.
We also need to call the sysinfo.tcl
make the scripts folder executable and get the scripts
remove:
set sys_flag ""
We also change the bash file: sysinfo.sh
If you don't have sensors installed do so or remove that line
It's time to test (cross fingers)
Log into IRC with your username and tell the bot:
It asks you to set password.
Killing it:
Starting it:
Now we want to deamonize the script
and add:
#!/bin/sh
Echo "Starting Eggdrop IRC bot..."
cd /usr/lib/eggdrop
sudo -u username eggdrop /home/username/simple.conf
apt-get install lm-sensors sensors-detect
sensors
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
We also need to call the sysinfo.tcl
# TCL scripts - specify any TCL scripts you wish to load. source scripts/sysinfo.tcl
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
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"
It's time to test (cross fingers)
cd /usr/lib/eggdrop eggdrop -m simple.conf
/msg yourbotname HELLO
Killing it:
kill -9 $(cat pid.*)
eggdrop simple.conf
sudo nano /etc/init.d/eggbot