Monthly Archives: November 2008

a bash script to control spawn-fcgi as a service

first create a file named “php-fastcgi” in /usr/bin/, suppose your spawn-fcgi is in /usr/bin/, don’t forget to chmod +x on the file

#!/bin/sh
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -f /usr/bin/php5-cgi

then create another file named “init-fastcgi” in /etc/init.d/ and run “sudo update-rc.d init-fastcgi defaults”

#!/bin/bash
PHP_SCRIPT=/usr/bin/php-fastcgi
RETVAL=0
case "$1" in
    start)
      $PHP_SCRIPT
      RETVAL=$?
  ;;
    stop)
      killall -9 php5-cgi
      RETVAL=$?
  ;;
    restart)
      killall -9 php5-cgi
      sleep 0.5
      $PHP_SCRIPT
      RETVAL=$?
  ;;
    *)
      echo "Usage: php-fastcgi {start|stop|restart}"
      exit 1
  ;;
esac
exit $RETVAL

馬勒戈壁的ubuntu

經過6次errno 5後終於人品爆發了一次從terminal運行ubiquity裝上了

不枉費我刻了三張cd 一張 dvd

換64bit後貌似cpu效率高了一點, 不過可能是心理作用…

anyways, fresh 的系統還是用起來蠻爽的, 字體也不改了直接用正黑, 雖然anti aliasing還是不好不過至少看得過去了