summaryrefslogtreecommitdiff
blob: eb555fcd6568dcfe09a982df1a3bf22edd75ce00 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/sbin/runscript

PROG_NAME="OX"

groupware="/etc/open-xchange/init.d/groupware"
webmail="/etc/open-xchange/init.d/webmail"
sessiond="/etc/open-xchange/init.d/sessiond"

depend() {
        need net slapd postfix cyrus apache2 tomcat5
	use postgresql mysql
	after postgresql mysql
}

checkconfig() {
        if [ ! -x "$groupware"  ] ; then
          eerror "$groupware doesn't exist or nor executable"
	return 1
	fi
	if [ ! -x "$webmail"  ] ; then
		eerror "$webmail doesn't exist or nor executable"
	return 1
	fi	
	if [ ! -x "$sessiond"  ] ; then
		eerror "$sessiond doesn't exist or nor executable"
	return 1
	fi
}


start() {
        checkconfig || return 1
	ebegin "Starting Open-Xchange"
	start="$sessiond start"
	$start
	start="$groupware start"
	$start
	start="$webmail start"
	$start
#	eend $?
}

stop() {
	echo "Stoping Open-Xchange"
	stop="$sessiond stop"
	$stop
	stop="$groupware stop"
	$stop
	stop="$webmail stop"
	$stop
}

opts="${opts} extendstatus"

extendstatus() {
	status="$sessiond status"
	$status
	status="$groupware status"
	$status
	stop="$webmail status"
	$status
}