1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/bin/bash action="$1" case $action in add) rc-update -q add vmware-workstation-server default rc-service vmware-workstation-server start ;; remove) rc-update -q del vmware-workstation-server default rc-service vmware-workstation-server stop ;; status) rc-service -q vmware-workstation-server status ;; *) exit 1 ;; esac