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

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 $?
}