#!/bin/sh # # Start or stop the xbms server # # $FreeBSD$ pidfile="/var/run/xbms.pid" name="xbms" case "$1" in start) echo -n " xbms" if [ -f /usr/local/etc/xbms.conf ]; then /usr/local/bin/xbms fi ;; stop) if [ ! -f /var/run/xbms.pid ]; then echo "XBMS not running" exit 64 fi kill `cat /var/run/xbms.pid` ;; status) ps -auxww | egrep ${name} | egrep -v "($0|egrep)" ;; *) echo "" echo "Usage: `basename $0` { start | stop | status}" echo "" exit 64 ;; esac