summaryrefslogtreecommitdiffstats
path: root/lang/gnustep-base/files/GNUstep.sh
blob: e5905d124e99e6007b6a34bb25afd35825114dbf (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
#!/bin/sh

PREFIX=%%PREFIX%%
IFFILE=${PREFIX}/etc/gdomap_if
PIDFILE="/var/run/gdomap.pid"
GNUSTEP_SYSTEM_ROOT="${PREFIX}/GNUstep/System"

case "$1" in
start)
	if [ -e ${GNUSTEP_SYSTEM_ROOT}/Makefiles/GNUstep.sh ]; then
		ldconfig -m %%TARGLIB%%
		. ${GNUSTEP_SYSTEM_ROOT}/Makefiles/GNUstep.sh
		rm -f ${PIDFILE}
		opentool gdomap -a ${IFFILE} -I ${PIDFILE}
		opentool gdnc
		echo -n ' GNUstep'
	fi
	;;
stop)
	[ -r ${PIDFILE} ] && kill $(cat ${PIDFILE}) && echo -n ' GNUstep'
	killall gdnc
	rm -f ${PIDFILE}
	;;
*)
	echo "Usage: `basename $0` {start|stop}" >&2
	;;
esac

exit 0
OpenPOWER on IntegriCloud