Permalink
Browse files

Install xvfb init script, contributed by Sarah Mei

  • Loading branch information...
1 parent b8c846c commit 59d23fa0edbd7a3726a273dc68ac9236fa439a49 @michaelklishin michaelklishin committed Sep 3, 2011
@@ -26,4 +26,4 @@
%w(firefox)
end # case
-list.each { |pkg| package(pkg) { action :install } }
+list.each { |pkg| package(pkg) { action :install } }
@@ -0,0 +1,24 @@
+XVFB=/usr/bin/Xvfb
+XVFBARGS=":99 -ac -screen 0 1024x768x16"
+PIDFILE=/tmp/cucumber_xvfb_99.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
+ rm -f $PIDFILE
+ echo "."
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
+ exit 1
+esac
+exit 0
@@ -26,4 +26,12 @@
%w(xserver-xorg-core xvfb)
end # case
-list.each { |pkg| package(pkg) { action :install } }
+list.each { |pkg| package(pkg) { action :install } }
+
+cookbook_file "/etc/init.d/xvfb" do
+ owner "root"
+ group "root"
+ mode 0644
+
+ source "etc/init.d/xvfb.sh"
+end

0 comments on commit 59d23fa

Please sign in to comment.