rc.ajaxterm for AIX
A bunch of additional tests can be included, you can add syslog records etc...
You can use it from /etc/rc.d/rc2.d on AIX by creating the usual Sxx... Kxx... links.
#! /usr/bin/ksh## Control script for ajaxterm# (c) LGee## VariablesPATH=/usr/bin:/usr/sbina_user=ajaxterma_root=/path/to/wwwroot/ajaxterma_index=ajaxterm.htmla_pid=/var/tmp/ajaxterm.pida_stderr=/path/to/logs/ajaxterm/ajaxterm.err# Using python supplied by the IBM XIV storage host attachment kitpython_path=/opt/xpyv/bin# Maincase "$1" in start) su - $a_user -c "${python_path}/python ${a_root}/ajaxterm.py \ -d \ -i $a_index \ -P$a_pid \ -l 2> $a_stderr" \ || echo " ajaxterm/start ERROR" ;; stop) if ! [ -f $a_pid ]; then echo " ajaxterm/stop: not running" fi kill -9 $(<$a_pid) 2>/dev/null || rm -f $a_pid ;; status) if ! [ -f $a_pid ]; then echo " ajaxterm/status: OFFLINE" elif [ -t $(ps -p $(<$a_pid) -o pid=) ]; then echo " ajaxterm/status: OFFLINE" else echo " ajaxterm/status: ONLINE" fi ;; *) echo "Usage: rc.ajaxterm start|stop|status" ;;esac