blob: e760944272f706c9c91598553141e5015c817542 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need localmount
use net
}
checkconfig() {
# Check if certificates exist. If not, we need to generate them, ala sshd.
if [ ! -e @@ETCDIR@@/ssl/rui.key -o ! -e @@ETCDIR@@/ssl/rui.crt ]; then
mkdir -p @@ETCDIR@@/ssl
openssl req -x509 -days 365 -newkey rsa:2048 -keyout @@ETCDIR@@/ssl/rui.key -out @@ETCDIR@@/ssl/rui.crt -config @@ETCDIR@@/ssl/hostd.ssl.config
chmod -R 600 @@ETCDIR@@/ssl
fi
}
start() {
checkconfig
ebegin Starting VMware Workstation Server
start-stop-daemon --start --quiet --exec @@BINDIR@@/vmware-hostd \
-- -a -d @@ETCDIR@@/hostd/config.xml
eend $?
}
stop() {
ebegin Stopping VMware Workstation Server
start-stop-daemon --stop --quiet --exec @@BINDIR@@/vmware-hostd
eend $?
}
|