hoodwink.d enhanced
 

juretta.com

Restart lighttpd and Rails | May 16, 2006-->

May 16, 2006
Small shell script to restart lighttpd. The script kills all dispatch.fcgi processes and restarts the webserver.
#!/bin/bash
# Autor: Stefan Saasen 

# lighttpd stop
#kill -KILL $(ps -ax | grep "lighttpd.conf" | \
                             grep -v "grep" | awk '{print $1}')
echo "Stopping lighttpd..."
sudo /etc/init.d/lighttpd stop

# Ruby stop
echo "kill dispatch.fcgi processes..."
for i in $(ps aux | egrep "^www-data(.*)dispatch.fcgi" | \
             grep -v "grep" | awk '{print $2}'); do kill -KILL $i; done

# lighttpd start
echo "start lighttpd"
sudo /etc/init.d/lighttpd start

Diggman

About

juretta.com is the personal workspace of Stefan Saasen. You can send him an email or read more about this site in the „About“ section.

« Previous entry

Daedalus considered "verboten"
posted over 2 years ago

» Next entry

Rename jpgs
posted over 2 years ago

Recent comment

On: “Attachr.com: OpenID support added

You need to kill this spam stuff!

posted about 1 year ago by entropie

Look!

Latest links  RSS  

More...