-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
83 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
EAPI=5 | ||
|
||
PYTHON_COMPAT=( python2_7 ) | ||
inherit distutils-r1 | ||
|
||
DESCRIPTION="A VMware virtual serial port concentrator written in python" | ||
HOMEPAGE="https://github.com/pbhenson/vSPC.py" | ||
SRC_URI="https://github.com/pbhenson/vSPC.py/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="BSD-2" | ||
SLOT="0" | ||
IUSE="" | ||
KEYWORDS="amd64" | ||
|
||
DEPEND="dev-python/setuptools" | ||
RDEPEND="" | ||
|
||
src_unpack() { | ||
unpack ${A} | ||
mv vSPC.py-* ${P} || die | ||
} | ||
|
||
src_install() { | ||
distutils-r1_src_install | ||
|
||
newinitd contrib/gentoo/vspc-init vspc | ||
newconfd contrib/gentoo/vspc-conf vspc | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Config file for vspc | ||
|
||
# enable SSL | ||
VSPC_SSL="--ssl --cert=/etc/stunnel/stunnel.pem" | ||
|
||
# chose a different backend | ||
VSPC_BACKEND="--backend Logging -l /var/log/consoles -m 0644" | ||
|
||
VSPC_OPTS="--no-vm-port $VSPC_SSL $VSPC_BACKEND" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/sbin/openrc-run | ||
|
||
extra_started_commands="reload" | ||
|
||
depend() { | ||
need net | ||
} | ||
|
||
start() { | ||
ebegin "Starting vSPC.py Virtual Serial Port Concentrator" | ||
local pidfile=/var/run/vspc/vspc.pid | ||
mkdir -p "$(dirname ${pidfile})" | ||
start-stop-daemon --start --quiet --pidfile=${pidfile} \ | ||
--exec /usr/bin/vSPCServer -- --pidfile=${pidfile} $VSPC_OPTS | ||
eend $? | ||
} | ||
|
||
reload() { | ||
ebegin "Reloading vSPC.py Virtual Serial Port Concentrator" | ||
local pidfile=/var/run/vspc/vspc.pid | ||
kill -HUP $(cat ${pidfile}) | ||
eend $? | ||
} | ||
|
||
stop() { | ||
local pidfile=/var/run/vspc/vspc.pid | ||
ebegin "Shutting down vSPC.py Virtual Serial Port Concentrator" | ||
start-stop-daemon --stop --quiet --pidfile=${pidfile} | ||
eend $? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters