#!/bin/sh CMD=`pgrep -x xmms` if [ -z "$CMD" ] ; then xmms -p /mnt/dvd fi if [ -n "$CMD" ] ; then pkill -f xmms xmms -p /mnt/dvd fi