1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00
freebsd-ports/net/xbms/files/xbms.sh.sample
Kirill Ponomarev be1c2bc0bf - The startup script checks the existance of
/usr/local/etc/xbms.conf.sample before starting the
  process. It is normal to rename the .sample scripts
  such as xbms.conf.sample -> xbms.conf.

PR:		57822
Submitted by:	Andrew Thompson <andy@fud.org.nz>
2003-10-10 06:56:17 +00:00

36 lines
517 B
Bash

#!/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