Startup script for Typo
Posted by Paul Verreth Mon, 26 Mar 2007 06:30:00 GMT
This is an init script you can use so that typo will be started after an system reboot. Using chkconfig, it wil be activated in the runlevel system (/etc/rc[0-6].d)
Also see: Installing typo with the installer
#!/bin/bash
#
# /etc/rc.d/init.d/typo_sos
#
# Start typo blogging engine
#
# chkconfig: - 65 35
# description: Typo blogging engine
# processname: typo
# Source function library.
. /etc/init.d/functions
TYPO=/usr/bin/typo
TYPODIR=/var/www/your-website-directory/blog
test -x $TYPO || exit 0
RETVAL=0
prog="Typo blogging engine"
start() {
echo -n $"Starting $prog: "
cd $TYPODIR
$TYPO start $TYPODIR
RETVAL=$?
echo
}
stop() {
echo -n $"Stopping $prog: "
cd $TYPODIR
$TYPO stop $TYPODIR
RETVAL=$?
echo
}
#
# See how we were called.
#
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RETVAL
Read more...

