public
Created

  • Download Gist
gistfile1.bat
Batchfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#! /bin/bash
#
# xvfb Start/Stop Xvfb server.
#
# chkconfig: 345 91 10
# description: Xvfb is a virtual framebuffer X server. Xvfb is an X server that can run on machines with no display hardware and no physical input devices.
# processname: xvfb
# pidfile: ~/xvfb_${DISPLAY:1}.pid
 
 
XVFB=/usr/bin/Xvfb
XVFBARGS="$DISPLAY -ac -screen 0 1024x768x16"
PIDFILE=~/xvfb_${DISPLAY:1}.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
/sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;
stop)
echo -n "Stopping virtual X frame buffer: Xvfb"
/sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE
echo "."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
exit 1
esac
exit 0

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.