Hey, thanks so much for the how-to! I have syslog-ng running nicely, however I can no longer see the logs in the web interface. I'm assuming it's just because the logs are now being put someplace different? Is there a way to fix this? Where is it expecting to see the log files, and will I break things if I move it there?

Thanks!

Quote Originally Posted by tiwag View Post
HOWTO: install syslog-ng on a WL700gE
2007-08-23 tiwag

preferences:
install kfurge's modified firmware WL700gE_1.0.4.6_kc_02a
http://home.comcast.net/~kfurge/wl700g.html

installation:
1. install syslog-ng from http://ipkg.nslu2-linux.org/feeds/op...table/Packages
Code:
	root$ ipkg update
	root$ ipkg install syslog-ng
this installs syslog-ng version 2.0.4-2 (at the time of writing)

there will be an error message when running the postinstall script

2. edit the postinstall-script
so that the ipkg installation can be run and terminated successfully

here is a copy of mine:

Code:
#!/bin/sh
###############################################################################
# /opt/lib/ipkg/info/syslog-ng.postinst
# 2007-08-23 tiwag
# 
# modified ipkg postinstall script for syslog-ng used on WL700g
#

echo
echo "How to use syslog-ng on a WL700gE"
echo "1. kill syslogd before you start syslog-ng."
echo "   $ killall syslogd"
echo "2. Edit the file /opt/etc/init.d/S01syslog-ng."
echo "   add the path to the configuration file
echo "   /opt/sbin/syslog-ng -f /opt/etc/syslog-ng/syslog-ng.conf
echo "3. run /opt/etc/init.d/S01syslog-ng."
echo
echo "Log files will be created by default at /opt/var/log."
echo

3. finish the ipkg installation
Code:
	root$ ipkg install syslog-ng
finishes installation without an error message


4. edit the startup-script
by default syslog-ng_2.0.4-2 expects its config-file
in /opt/etc/syslog-ng.conf (bug?), but the ipkg installer
installs it in /opt/etc/syslog-ng/syslog-ng.conf.
run syslog-ng with proper path to the config-file

example of my startup script:


Code:
#!/bin/sh
###############################################################################
# /opt/etc/init.d/S01syslog-ng
# 2007-08-23 tiwag
# 
# Startup script for syslog-ng used on WL700g
#

# Stop syslogd if running
if [ -n "`pidof syslogd`" ]; then
    /bin/killall syslogd 2>/dev/null
    sleep 2
fi


# Stop itself if running
if [ -n "`pidof syslog-ng`" ]; then
    /bin/killall syslog-ng 2>/dev/null
    sleep 2
fi

# start syslog-ng with path to syslog-ng.conf file
/opt/sbin/syslog-ng -f /opt/etc/syslog-ng/syslog-ng.conf
sleep 2


5. run the startup-script and test syslog-ng,

the syslog can be viewed e.g. with
Code:
	root$ cat /opt/var/log/syslog
if everything works as you expected, add the startup script
for syslog-ng to your rc.local file and reboot your brick


HTH, brgds,

--
tiwag



ps.
now i'm going to install fail2ban ... wish me luck !