I think I know how to upgrade lighttpd to a newer version in an elegant way, but because I don't have that much experience with it, I would like you to comment on it.
I edited this how-to on July 17th
When you install Optware, those programs will use /opt/var/log for its log-files and /opt/var/run for the pids.
Personally I don't like those files to be scattered, so I'm replacing those for symbolic links
rm -r /opt/var/log
ln -s /var/log/ /opt/var/log
rm -r /opt/var/run
ln -s /var/run /opt/var/run
Startup-scripts will be created in /opt/etc/init.d each time you install a service with optware.
To automatically run them when starting and stopping your system, you have to install a script /etc/init.d/S90optware
if [ -d /opt/etc/init.d ]; then
for f in /opt/etc/init.d/S* ; do
[ -x $f ] && $f start
chmod +x /etc/init.d/S90optware
OK, let's install httpd using optware:
ipkg install lighttpd
Installing lighttpd (1.4.19-3) to /opt/…
package lighttpd suggests installing e2fsprogs
package lighttpd suggests installing libmemcache
package lighttpd suggests installing lua
package lighttpd suggests installing memcached
package lighttpd suggests installing sqlite
package lighttpd suggests installing mysql
Stopping web server: lighttpd
Starting web server: lighttpd
It is now running the optware-version with the optware config
ps ax | grep light
32285 ? S 0:00 /opt/sbin/lighttpd -f /opt/etc/lighttpd/lighttpd.conf
32326 pts/0 S+ 0:00 grep light
Back-up original lighttpd and create a symbolic link to the optware version (future upgrades will stick)
mv lighttpd lighttpd.org
ln -s /opt/sbin/lighttpd lighttpd
chown -R www-data:www-data /var/log/lighttpd
Restarting lighttpd: lighttpd.
ps ax | grep light
672 ? S 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
692 pts/0 S+ 0:00 grep light
The script in /etc/init.d will be used to startup lighttpd.
It's nicer if you disable the script in /opt/etc/init.d/
chmod -x /opt/etc/init.d/S80lighttpd
your book is running lighttpd 1.4.19 and a next Optware update will also update your lighttpd.
Maybe you need to remove the executable flag again on opt/etc/init.d/S80lighttpd.
The script already has a check to see if lighttpd is already running, so it's not that necessary.
Although I don't know the advantage of this newer version…. ;-)