Skip to content

Instantly share code, notes, and snippets.

@ghedamat
Created November 27, 2012 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghedamat/4155916 to your computer and use it in GitHub Desktop.
Save ghedamat/4155916 to your computer and use it in GitHub Desktop.
Gentoo Xfvb init script
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
PIDFILE=/var/run/xvfb
XVFB=/usr/bin/Xvfb
XVFBARGS=":0"
USER=youruser
start() {
ebegin "Starting virtual X frame buffer: Xvfb"
start-stop-daemon --start --pidfile $PIDFILE --user $USER --make-pidfile --background --exec $XVFB -- $XVFBARGS
eend ${?}
}
stop() {
ebegin "Stopping virtual X frame buffer: Xvfb"
start-stop-daemon --stop --pidfile $PIDFILE
eend ${?}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment