summaryrefslogtreecommitdiff
blob: 0b8b024e20b5ffcd1d6f636bf5e8bc2957ed3bc0 (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
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

opts="checkconfig"

depend() {
	need net
}

start() {
	if test "${ALLOW_ROOT}" = YES; then
		CHUID=""
	else
		CHUID="--chuid sysorb"
	fi

	ebegin "Starting SysOrb Agent"
	start-stop-daemon --start --name ${NAME} --pidfile ${PIDFILE} ${CHUID} \
		--startas /bin/sh -- -c "rm -f ${PIDFILE}; ${SOAGENT} --pidfile ${PIDFILE}"
	eend $? "Failed to start SysOrb Agent"
}

stop() {
	ebegin "Stopping SysOrb Agent"
	start-stop-daemon --stop --name ${NAME} --pidfile ${PIDFILE}
	eend $? "Failed to stop SysOrb Agent"
}

checkconfig() {
	ebegin "Checking SysOrb Agent config"
	${TESTCONF} ${CONF} test
	eend $?
}