summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gnustep-apps/sogo/files')
-rw-r--r--gnustep-apps/sogo/files/sogod.confd57
-rw-r--r--gnustep-apps/sogo/files/sogod.initd63
-rw-r--r--gnustep-apps/sogo/files/sogod.initd.172
3 files changed, 14 insertions, 178 deletions
diff --git a/gnustep-apps/sogo/files/sogod.confd b/gnustep-apps/sogo/files/sogod.confd
index 324c6e0..906a697 100644
--- a/gnustep-apps/sogo/files/sogod.confd
+++ b/gnustep-apps/sogo/files/sogod.confd
@@ -1,57 +1,6 @@
# /etc/conf.d/sogod: config file for /etc/init.d/sogod
-# Options for SOGo
-SOGOD_OPTS=""
+SOGOD_WORKERS=3
-# Enable all or a subset of the options below to run
-# SOGo with additional debug options
-###
-#SOGOD_OPTS="${SOGOD_OPTS} -DAVParserDebugProp YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SOGoDebugLeaks YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SOGoDebugRequests YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SOGoUIxDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoClassRegistryDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugKeyLookup YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugProductLoading YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugProductRegistry YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugRequestClassification YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoDebugTraversal YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugAuthLookup YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugFactory YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugNegotiate YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugPlistObject YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSDebugRestore YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSResourceManagerDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoOFSWebMethodDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoObjCClassDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectDAVDispatcherDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectDataSourceDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectMethodDispatcherDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectRequestHandlerDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectSOAPDispatcherDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoObjectXmlRpcDispatcherDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoPageInvocationDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoProductResourceManagerDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoRendererDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoSecurityManagerDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugActions YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugComponentAwake YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugComponentDefinition YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugComponentLookup YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugCursor YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugHttpTransaction YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugKeyPathAssociation YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugResourceLookup YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugStaticLinkProcessing YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugTakeValues YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebugZipResponse YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WODebuggingEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WOPageRequestHandlerDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WOResourceURLAssociationDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WOSimpleHTTPParserDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WOSimpleHTTPParserHeavyDebugEnabled YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WOxComponentElemBuilderDebugEnabled YES"
-# Additional useful things for debugging
-#SOGOD_OPTS="${SOGOD_OPTS} -SoLogSecurityDeclarations YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -SoRedirectToDefaultMethods YES"
-#SOGOD_OPTS="${SOGOD_OPTS} -WOIsRedirectionEnabled YES"
+# Additional options for SOGo
+SOGOD_OPTS=""
diff --git a/gnustep-apps/sogo/files/sogod.initd b/gnustep-apps/sogo/files/sogod.initd
index c370ba4..2575d92 100644
--- a/gnustep-apps/sogo/files/sogod.initd
+++ b/gnustep-apps/sogo/files/sogod.initd
@@ -1,74 +1,33 @@
#!/sbin/runscript
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-sogod_bin=""
-sogod_port=""
+SOGOD_PID=/run/sogo/sogod.pid
depend() {
need net
- after pg_autovacuum postgresql mysql
+ after postgresql mysql
after slapd
after mta
after memcached
}
-checkconfig() {
- if [ -f "/etc/GNUstep/GNUstep.conf" ]; then
- source /etc/GNUstep/GNUstep.conf
- else
- eerror "Can't find /etc/GNUstep/GNUstep.conf"
- return 1
- fi
- if [ -x "${HOME}/${GNUSTEP_USER_DIR_ADMIN_TOOLS}/sogod" ]; then
- sogod_bin="${HOME}/${GNUSTEP_USER_DIR_ADMIN_TOOLS}/sogod"
- elif [ -x "${GNUSTEP_LOCAL_ADMIN_TOOLS}/sogod" ]; then
- sogod_bin="${GNUSTEP_LOCAL_ADMIN_TOOLS}/sogod"
- elif [ -x "${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod" ]; then
- sogod_bin="${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod"
- elif [ -x "${GNUSTEP_NETWORK_ADMIN_TOOLS}/sogod" ]; then
- sogod_bin="${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod"
- else
- eerror "Can't find sogod"
- return 1
- fi
- if [ -f "${GNUSTEP_MAKEFILES}/GNUstep.sh" ]; then
- source "${GNUSTEP_MAKEFILES}/GNUstep.sh"
- else
- eerror "Can't find ${GNUSTEP_MAKEFILES}/GNUstep.sh"
- return 1
- fi
- sogod_port="$(defaults -u sogo read sogod WOPort 2>/dev/null)"
- if [ "${?}" -eq 0 ]; then
- sogod_port="${sogod_port##* }"
- if [ "$((${sogod_port}+1-1))" != "${sogod_port}" ]; then
- sogod_port="20000"
- fi
- else
- sogod_port="20000"
- fi
- touch /var/log/sogod.log
- chown sogo /var/log/sogod.log
-}
-
start() {
- checkconfig || return 1
+ checkpath -q -d -m 0755 -o sogo:sogo $(dirname "${SOGOD_PID}")
ebegin "Starting SOGo service"
- start-stop-daemon \
- --start \
- --exec ${sogod_bin} \
- --chuid sogo \
- --make-pidfile \
- --background \
- --pidfile /var/run/sogod.pid \
- -- -WOPort ${sogod_port}
+ start-stop-daemon --start --quiet \
+ --user sogo --exec /usr/sbin/sogod \
+ -- -WOWorkersCount ${SOGOD_WORKERS} \
+ -WOLogFile /var/log/sogo/sogod.log \
+ -WOPidFile "${SOGOD_PID}" \
+ "${SOGOD_OPTS}"
eend ${?}
}
stop() {
ebegin "Stopping SOGo service"
start-stop-daemon --stop \
- --pidfile /var/run/sogod.pid
+ --pidfile "${SOGOD_PID}"
eend ${?}
}
diff --git a/gnustep-apps/sogo/files/sogod.initd.1 b/gnustep-apps/sogo/files/sogod.initd.1
deleted file mode 100644
index 8e5b397..0000000
--- a/gnustep-apps/sogo/files/sogod.initd.1
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-sogod_bin=""
-sogod_port=""
-
-depend() {
- need net
- after pg_autovacuum postgresql mysql
- after slapd
- after mta
- after memcached
-}
-
-checkconfig() {
- if [ -f "/etc/GNUstep/GNUstep.conf" ]; then
- source /etc/GNUstep/GNUstep.conf
- else
- eerror "Can't find /etc/GNUstep/GNUstep.conf"
- return 1
- fi
- if [ -x "${HOME}/${GNUSTEP_USER_DIR_ADMIN_TOOLS}/sogod" ]; then
- sogod_bin="${HOME}/${GNUSTEP_USER_DIR_ADMIN_TOOLS}/sogod"
- elif [ -x "${GNUSTEP_LOCAL_ADMIN_TOOLS}/sogod" ]; then
- sogod_bin="${GNUSTEP_LOCAL_ADMIN_TOOLS}/sogod"
- elif [ -x "${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod" ]; then
- sogod_bin="${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod"
- elif [ -x "${GNUSTEP_NETWORK_ADMIN_TOOLS}/sogod" ]; then
- sogod_bin="${GNUSTEP_SYSTEM_ADMIN_TOOLS}/sogod"
- else
- eerror "Can't find sogod"
- return 1
- fi
- if [ -f "${GNUSTEP_MAKEFILES}/GNUstep.sh" ]; then
- source "${GNUSTEP_MAKEFILES}/GNUstep.sh"
- else
- eerror "Can't find ${GNUSTEP_MAKEFILES}/GNUstep.sh"
- return 1
- fi
- sogod_port="$(defaults -u sogo read sogod WOPort 2>/dev/null)"
- if [ "${?}" -eq 0 ]; then
- sogod_port="${sogod_port##* }"
- if [ "$((${sogod_port}+1-1))" != "${sogod_port}" ]; then
- sogod_port="20000"
- fi
- else
- sogod_port="20000"
- fi
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting SOGo service"
- start-stop-daemon \
- --start \
- --exec ${sogod_bin} \
- --chuid sogo \
- -- ${SOGOD_OPTS} \
- -WOPort ${sogod_port} \
- -WOLogFile /var/log/sogo/sogod.log \
- -WOPidFile /var/run/sogod/sogod.pid
- eend ${?}
-}
-
-stop() {
- ebegin "Stopping SOGo service"
- start-stop-daemon --stop \
- --pidfile /var/run/sogod/sogod.pid
- eend ${?}
-}