Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

Restart lighttpd script

I use this script to avoid having to do the killall dance on my local dev box constantly when tweaking my lighttpd.conf

#!/bin/sh
sudo killall -9 lighttpd
sudo killall -9 ruby
sudo /opt/local/sbin/lighttpd -f /opt/local/etc/lighttpd.conf


Make the script executable (chmod u+x), put it in your path, invoke by simply typing the name of the script. This also kills off any ruby processes, which lighttpd will restart when it reboots.

The path to lighttpd and the lighttpd.conf files are based on the installation from DarwinPorts - adjust as needed.

Lighttpd launchd item for OS X 10.4

Save the following in /Library/LaunchDaemons/net.lighttpd.plist to have lighttpd start automatically on any OS X 10.4 computer. Note that this assumes a working DarwinPorts lighttpd installation (otherwise you will need to change the paths to the lighttpd executable). Note that this also assumes that the lighttpd.conf file is in /opt/local/etc.

<?xml version="1.0" encoding="UTF-8"?>
DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Labelkey>
        net.lighttpd</string>
        <key>OnDemandkey>
        />
        <key>Programkey>
        /opt/local/sbin/lighttpdstring>
        ProgramArguments</key>
        <array>
                <string>/opt/local/sbin/lighttpdstring>
                -f/opt/local/etc/lighttpd.confstring>
                -D</string>
        array>
</dict>
plist>
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed