diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2015-08-15 23:00:12 +0100 |
---|---|---|
committer | Bertrand Jacquin <bertrand@jacquin.bzh> | 2015-08-18 21:48:42 +0100 |
commit | 3dff1910ac1c6869ee06b1337af8bea121505937 (patch) | |
tree | 05787ffa310b1b65c9f2e2b55847915f7f0a343b | |
parent | factory-default/net-misc/openssh: Add ssh-agent init scripts (diff) | |
download | portage-3dff1910ac1c6869ee06b1337af8bea121505937.tar.xz |
factory-default/x11-base/xorg-server: Add Xvfb init script
-rwxr-xr-x | factory-default/x11-base/xorg-server/etc/init.d/Xvfb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/factory-default/x11-base/xorg-server/etc/init.d/Xvfb b/factory-default/x11-base/xorg-server/etc/init.d/Xvfb new file mode 100755 index 00000000..67f4fad9 --- /dev/null +++ b/factory-default/x11-base/xorg-server/etc/init.d/Xvfb @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PIDFILE="/run/${RC_SVCNAME}.pid" +XVFB=/usr/bin/Xvfb +XVFBARGS=":0 -screen 0 1600x1200x24" +USER=nobody + +start() { + ebegin "Starting virtual X frame buffer: Xvfb" + start-stop-daemon --start \ + --pidfile "${PIDFILE}" --make-pidfile \ + --user "${USER}" --background \ + --exec "${XVFB}" -- ${XVFBARGS} + eend $? +} + +stop() { + ebegin "Stopping virtual X frame buffer: Xvfb" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} |