blog

systemd: servicefile for VMware Player

/ 30 Januar 2013

/etc/systemd/system/vmware.service

[Unit]
Description=VMware daemon
[Service]
ExecStart=/usr/local/bin/vmware start
ExecStop=/usr/local/bin/vmware stop
#PIDFile=/var/lock/vmware/vmware.lck
TimeoutSec=0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

/usr/local/bin/vmware

#!/bin/sh
case "${1}" in
start)
#start-stop-daemon --start --exec /opt/vmware/bin/vmware-usbarbitrator
/opt/vmware/bin/vmware-usbarbitrator 
modprobe -a vmmon vmci vsock vmblock vmnet 
/opt/vmware/bin/vmware-networks --start
;;
stop)
#start-stop-daemon --stop --exec /opt/vmware/bin/vmware-usbarbitrator
killall --wait /opt/vmware/bin/vmware-usbarbitrator 
/opt/vmware/bin/vmware-networks --stop 
modprobe -r vsock vmci vmmon vmblock vmnet
;;
esac