summaryrefslogtreecommitdiff
blob: 96d78ca8d6fa800708dc4308dba338968109f893 (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/media-gfx/maya/files/aw_flexlm,v 1.3 2005/07/30 20:45:10 eradicator Exp $

# description: aw_flexlm controls the Flexlm License Server Daemon for \
#              Alias|Wavefront Products.
# processname: lmgrd

depend() {
        need net
}

checkconfig() {
	if [[ -x "/opt/aw/COM/etc/lmgrd" ]]; then
		if [[ -f "$LICENSE_FILE" ]] ; then
			return 0
		else
			eerror "ERROR Cannot run FLEXlm Licensing daemon: lmgrd"
			eerror "$LICENSE_FILE does not exist."
		fi
	else
		eerror "ERROR Cannot run FLEXlm Licensing daemon: lmgrd"
		eerror "/opt/aw/COM/etc/lmgrd does not exist or is not executable"
	fi

	return 1
}

start() {
	checkconfig || return 1
	ebegin "Starting FLEXlm License Server Daemon for Alias|Wavefront software"
	su nobody -c "/opt/aw/COM/etc/lmgrd -c ${LICENSE_FILE} -l ${LOG}"	
        eend $?
}

stop() {
	ebegin "Shutting Down FLEXlm License Server Daemon for Alias|Wavefront software"
	/opt/aw/COM/bin/lmdown -q -c "${LICENSE_FILE}"
        eend $?
}