Monthly Archive for January, 2007

Google: ‘Did you mean “American Ingenuity”?’

Okay, this just takes the cake. Search for [African Ingenuity] in Google, and see what it suggests instead. BoingBoing calls it “biased and unfortunate“, while Google Blogoscoped says it’s a “strange” suggestion. Guess they haven’t heard of “Pinoy ingenuity”. ;)

Writing a custom init script

It’s been a long time since I did a source tar-ball install. But the production servers at work require that applications that are not part of the standard install base (from Kickstart/Jumpstart and VMWare images) should be compiled from source. It was a very refreshing experience. :)

So after going through the usual configure; make; make install invocation, it was time to make sure that the app is persistent at boot. I would have copied an init script from my *nix desktop, but good thing SLES had a baseline script in /etc/init.d/skeleton.

In a nutshell, the steps are:

  1. Define the INIT INFO section, as per the LSB specs.
  2. Fill in the variables.
  3. Use /etc/rc.status and rc_* functions for sanity checks.
  4. Create the basic start, stop and status functions.
  5. Use YAST (System > System Services (Runlevel)) — or, if available, innserv — to enable the startup script.

Below is a script I wrote for Apache:

#!/bin/sh
#
# Author: Ian Dexter R. Marquez
#
# /etc/init.d/httpd
#
### BEGIN INIT INFO
# Provides: httpd
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the Apache httpd daemon
### END INIT INFO

HTTPD=/path/to/apache/2.2.4/bin/httpd
APACHECTL=/path/to/apache/2.2.4/bin/apachectl
PROG=httpd

test -x $HTTPD || exit 5
test -s /etc/rc.status && . /etc/rc.status && rc_reset

start() {
	echo -n "Starting $PROG: "
	$HTTPD -k start
	rc_status -v
}

stop() {
	echo -n "Stopping $PROG: "
	/sbin/killproc $HTTPD
	rc_status -v
}

status() {
	echo -n "Checking $PROG: pid "
	/sbin/pidofproc $HTTPD
	rc_status -v
}

case "$1" in 
  start)
	start
	;;
  stop)
	stop
	;;
  restart)
	stop
	start
	rc_status
	;;
  status)
	status
	;;
  try-restart|condrestart)
        if test "$1" = "condrestart"; then
                echo "${attn} Use try-restart ${done}(LSB)${attn} \\
                  rather than condrestart ${warn}(RH)${norm}"
        fi
        $0 status
        if test $? = 0; then
                $0 restart
        else
                rc_reset        # Not running is not a failure.
        fi
        # Remember status and be quiet
        rc_status
        ;;
  graceful|help|configtest|fullstatus)
	$APACHECTL $@
	rc_status 
	;;
  *)
	echo "Usage: $PROG \\
           {start|stop|restart|status|graceful|help|configtest|fullstatus}"
	exit 1
esac
rc_exit


References:

Social software in the workplace

Interesting news at NY Times: IBM is set to launch social software tools in the corporate world.

(Hmm… I wonder if Sacha Chua’s ongoing research is part of this tool set?)

Here at work, we use Lotus Notes for typical “groupware” applications: calendars, email, instant messaging, and task management. I have also explored the use of blogs and wikis in my previous companies, but they did not really took off that well. Perhaps the IBM experience can lead the way in exploring the use of these thriving media for the workplace.

Wordpress 2.1 is out

Ella‘ is now out. Ack, I just did a one-click upgrade to 2.07 on Dreamhost. :P

MacGyver multitool

MacGyver multitool

Via Gizmodo.