[sargis@appsrv ~]# cat /etc/init.d/vm-guests
#!/bin/bash
#
# chkconfig: 235 81 29
# description: Start vmware guests.
# Source function library.
. /etc/rc.d/init.d/functions
case "$1" in
start)
echo -n $"Starting vmware guests: "
su - sargis -c "/usr/bin/vmrun -T ws start /srv/vmware/
echo
;;
stop)
echo -n $"Shutting down vmware guests: "
/usr/bin/vmrun -T ws stop /srv/vmware/dsrv/
echo
;;
restart|force-reload)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 2
esac