Howto: Setup Embedded Uptime Project (euptime) on your ASUS router
A small Howto for setting up the Embedded Uptime Project (euptime) for ASUS routers.
1) Create an account on
www.euptime.de in the
register dialog.
Later you can login and lookup the devices online and configure the status information design.
2) Copy the
stbup executable to the router from
here - many thanks to
ryzhov_al for providing it!
Place the executable into a folder which will survive reboots (NOT in tmp) and even firmware update: In my case the Optware bin-folder (/opt/bin) was selected.
3) Change the file mode to make it executable:
Code:
chmod 755 /opt/bin/stbup
ls -lah /opt/bin/stbup
-rwxr-x-r-x 1 admin root 21.2K Jun 13 09:21 /opt/bin/stbup
4) Create the
stbup.conf file for the configuation. Again it should be stored on the router to survive reboots and firmware updates: In my case I have again choosen the Optware etc-folder (/opt/etc).
Example of an
stbup.conf:
Code:
STBUP_ON=1
USERNAME=xxxxxx (Login-Name)
PASSNAME=yyyyyy (Password)
DESCRIPTION=RouterName
INTERVAL=60 (update interval in Minutes)
GROUPID=4 (4 for Routers)
DEBUGMODE=1
SERVERNAME=http://www.embedded-uptime-project.com
Remove the information in brackets () and add your inputs to the section!
5) Test the stbup setup via telnet command:
Code:
[ -e /opt/bin/stbup ] && /opt/bin/stbup -C /opt/etc/stbup.conf &
Output of the command should be like this:
Code:
[stbup] found 2 interfaces
[stbup] MAC=000000000000 by Interface=lo
[stbup] MAC=C43DC7xxyyzz by Interface=eth0
[stbup] Username='xxxxxx'
[stbup] GroupID=4
[stbup] Uptime Server='http://www.embedded-uptime-project.com'
[stbup] Interval=3600sec
[stbup] Description='RouterName'
[stbup] Host='www.embedded-uptime-project.com', Port=80
[stbup] Update OK Uptime 48917
[stbup] next Update in 60 min
6) Put the start command into a place to start it on reboot. For Merlin's firmware it would be a good place in the User Script
post-mount (in /jffs/scripts folder).
Here my
post-mount script (incl. the parts for Optware start as stbup and conf-file are there):
Code:
#!/bin/sh
/bin/sleep 3s
/usr/bin/logger -t START_$(basename $0) "started [$@]"
SCRLOG=/tmp/$(basename $0).log
touch $SCRLOG
echo "START_$(basename $0) started [$@]" >> $SCRLOG
if [ $1 = "/tmp/mnt/sdcard" ]
then
mkdir /tmp/opt >> $SCRLOG
/bin/mount -o bind /tmp/mnt/sdcard/Optware /opt >> $SCRLOG
/opt/etc/init.d/rc.unslung start >> $SCRLOG
[B][ -e /opt/bin/stbup ] && /opt/bin/stbup -C /opt/etc/stbup.conf &[/B]
fi
if [ "$?" -ne 0 ]
then
echo "Error in postmount execution! Script: $0" >> $SCRLOG
else
echo "Postmount execution OK. Script: $0" >> $SCRLOG
fi
/usr/bin/logger -t STOP_$(basename $0) "return code $?"
exit $?
Hope you have fun with this!
With kind regards
Joe
