Skip to content

Instantly share code, notes, and snippets.

@nyxcalamity
Last active Apr 25, 2016
Embed
What would you like to do?
/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