[変えた方がよい]
・ディスプレイ番号やサイズを変数化したほうがよいでしょう
#!/bin/bash
#
# chkconfig: - 91 35
# description: Starts and stops XVfb. \
# used to provide virtual frame buffer.
# Source function library.
. /etc/init.d/functions
SERVICE="Xvfb"
RETVAL=0
XVFB=/usr/bin/Xvfb
start() {
echo -n "Starting ${SERVICE}: "
daemon ${XVFB} :5 -screen 0 800x600x24 &
echo
}
stop() {
echo -n "Stopping ${SERVICE}: "
killproc Xvfb
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
RETVAL=1
esac
exit ${RETVAL}