Skip to content

Instantly share code, notes, and snippets.

@nyxcalamity
Last active April 25, 2016 15:16
Show Gist options
  • Save nyxcalamity/7587476 to your computer and use it in GitHub Desktop.
Save nyxcalamity/7587476 to your computer and use it in GitHub Desktop.
/etc/init.d/xvfb service script
XVFB=/usr/bin/Xvfb
XVFB_ARGS=":1 -ac -screen 1 1600x1200x24"
XVFB_LOG=/var/log/xvfb
case "$1" in
start)
echo -n "Starting Xvfb: "
$XVFB $XVFB_ARGS 1>&2 2> $XVFB_LOG &
echo "OK"
;;
stop)
echo -n "Stopping Xvfb: "
killall Xvfb
echo "OK"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment