Skip to content

Instantly share code, notes, and snippets.

@reu
Created April 6, 2011 17:56
Show Gist options
  • Save reu/906148 to your computer and use it in GitHub Desktop.
Save reu/906148 to your computer and use it in GitHub Desktop.
RAILS_ENV=test DISPLAY=:2.0 rake db:migrate spec:acceptance
ISPLAY=:2.0
NAME=Xvfb
INSTALL_DIR=/usr/bin
DAEMON=$INSTALL_DIR/$NAME
DAEMON_ARGS="-ac -screen scrn 1024x768x24 $DISPLAY"
PIDFILE=/var/run/$NAME.pid
DAEMON_USER=root
DAEMON_GROUP=$DAEMON_USER
start-stop-daemon --background --make-pidfile --exec $DAEMON --start --name $NAME --pidfile $PIDFILE --chuid $DAEMON_USER:$DAEMON_GROUP -- $DAEMON_ARGS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment