summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/open-xchange/files/init.d.open-xchange')
-rw-r--r--www-apps/open-xchange/files/init.d.open-xchange84
1 files changed, 84 insertions, 0 deletions
diff --git a/www-apps/open-xchange/files/init.d.open-xchange b/www-apps/open-xchange/files/init.d.open-xchange
new file mode 100644
index 0000000..8d3d9c4
--- /dev/null
+++ b/www-apps/open-xchange/files/init.d.open-xchange
@@ -0,0 +1,84 @@
+#!/sbin/runscript
+
+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 apache2 tomcat-5
+ use postgresql mysql cyrus courier-imapd courier-imapd-ssl postfix
+ 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
+
+ local retval
+
+ ebegin "Starting Open-Xchange sessiond"
+ start-stop-daemon --start --exec ${sessiond} -- start &> /dev/null
+ retval=$?
+ eend $retval
+ [[ ${retval} -eq 0 ]] || return 1
+
+ ebegin "Starting Open-Xchange groupware"
+ start-stop-daemon --start --exec ${groupware} -- start &> /dev/null
+ retval=$?
+ eend $retval
+ [[ ${retval} -eq 0 ]] || return 1
+
+ ebegin "Starting Open-Xchange webmail"
+ start-stop-daemon --start --exec ${webmail} -- start &> /dev/null
+ retval=$?
+ eend $retval
+ [[ ${retval} -eq 0 ]] || return 1
+}
+
+stop() {
+ local retval
+
+ ebegin "Stopping Open-Xchange sessiond"
+ start-stop-daemon --start --exec ${sessiond} -- stop &> /dev/null
+ retval=$?
+ eend $retval
+ [[ ${retval} -eq 0 ]] || return 1
+
+ ebegin "Stopping Open-Xchange groupware"
+ start-stop-daemon --start --exec ${groupware} -- stop &> /dev/null
+ retval=$?
+ eend $retval
+ [[ ${retval} -eq 0 ]] || return 1
+
+ ebegin "Stopping Open-Xchange webmail"
+ start-stop-daemon --start --exec ${webmail} -- stop &> /dev/null
+ retval=$?
+ eend $retval
+ [[ ${retval} -eq 0 ]] || return 1
+}
+
+opts="${opts} extendstatus"
+
+extendstatus() {
+ status="$sessiond status"
+ $status
+ status="$groupware status"
+ $status
+ stop="$webmail status"
+ $status
+}