summaryrefslogtreecommitdiff
blob: 170d4d3b43985a13b75f1bbde80fcec2c0ce4150 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/gnustep-base/gnustep-gui/files/gsnd.initd,v 1.2 2006/12/05 20:22:42 grobian Exp $

service_name="GNUstep sound daemon"

if [ -e /etc/GNUstep/GNUstep.conf ];
then
	. /etc/GNUstep/GNUstep.conf
else
	GNUSTEP_SYSTEM_ROOT="/usr/GNUstep/System"
fi

start() {
	ebegin "Starting ${service_name}"

	# Check for necessary files
	if [ -d ${GNUSTEP_SYSTEM_ROOT}/Makefiles ];
	then
		# Source GNUstep makefile
		. ${GNUSTEP_SYSTEM_ROOT}/Makefiles/GNUstep.sh
	else
		return 1
	fi

	if [ -z "$GNUSTEP_FLATTENED" ];
	then
		TDIR=${GNUSTEP_SYSTEM_ROOT}/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}/${LIBRARY_COMBO}
	else
		TDIR=${GNUSTEP_SYSTEM_ROOT}/Tools
	fi

	if [ -x $TDIR/gnustep_sndd ];
	then
		$TDIR/gnustep_sndd
	fi
}

stop() {
	ebegin "Stopping ${service_name}"

	# Kill processes
	killall gnustep_sndd >& /dev/null
}