diff options
author | Stefan Garthe (the_mgt) <themgt@uncensored.citadel.org> | 2012-02-20 00:26:23 +0000 |
---|---|---|
committer | Stefan Garthe (the_mgt) <themgt@uncensored.citadel.org> | 2012-02-20 00:26:23 +0000 |
commit | 16d52e5df9c431694b2716022554521e01d742f3 (patch) | |
tree | 773e40082d6313025a2af1c0f9f65271a5e4dc73 /www-servers/webcit/files | |
parent | mail-mta/citadel: Version bump to 8.04 and EAPI=4 cleanups. Initscript improv... (diff) | |
download | sunrise-reviewed-16d52e5df9c431694b2716022554521e01d742f3.tar.gz sunrise-reviewed-16d52e5df9c431694b2716022554521e01d742f3.tar.bz2 sunrise-reviewed-16d52e5df9c431694b2716022554521e01d742f3.zip |
www-servers/webcit: Version bump to 8.04 and EAPI=4 cleanups. Initscript enhanced to support multiple running instances. Fixed locale path. Thanks to floppym, hasufell and everyone else who was most helpful.
svn path=/sunrise/; revision=12766
Diffstat (limited to 'www-servers/webcit/files')
-rw-r--r-- | www-servers/webcit/files/webcit.conf.d | 13 | ||||
-rw-r--r-- | www-servers/webcit/files/webcit.init.d | 26 |
2 files changed, 27 insertions, 12 deletions
diff --git a/www-servers/webcit/files/webcit.conf.d b/www-servers/webcit/files/webcit.conf.d index 1a0b2e869..c9b10aefc 100644 --- a/www-servers/webcit/files/webcit.conf.d +++ b/www-servers/webcit/files/webcit.conf.d @@ -1,6 +1,10 @@ # Config file for /etc/init.d/webcit +# It is possible to run multiple instances of webcit on the same system, +# if you use different ports. It works the same way openvpn does: +# # ln -s /etc/init.d/webcit /etc/init.d/webcit.servername +# # cp /etc/conf.d/webcit /etc/conf.d/webcit.servername +# #See /usr/share/docs/webcit/readme for details. -WEBCIT_OPTS="" ##[-i ip_addr] The IP address you wish to bind. ##Leave this out and WebCit will listen on all network interfaces. @@ -11,7 +15,7 @@ WEBCIT_OPTS="" #WEBCIT_OPTS="${WEBCIT_OPTS} -p 2000" ##[-u username] Lets Webcit drop root privileges and run as a useraccount. -#WEBCIT_OPTS="${WEBCIT_OPTS} -u webcit" +WEBCIT_OPTS="${WEBCIT_OPTS} -u webcit" ##[-t tracefile] Where you want WebCit to log information. WEBCIT_OPTS="${WEBCIT_OPTS} -t /var/log/webcit" @@ -28,4 +32,7 @@ WEBCIT_OPTS="${WEBCIT_OPTS} -t /var/log/webcit" ##[remotehost [remoteport]] IP address and port of your Citadel server. ##Defaults to localhost 504 -#WEBCIT_OPTS="${WEBCIT_OPTS} 127.0.0.1" +WEBCIT_OPTS="${WEBCIT_OPTS} 127.0.0.1" + +## Template debug option, only used when you debug the layout +#WEBCIT_OPTS="-T1" diff --git a/www-servers/webcit/files/webcit.init.d b/www-servers/webcit/files/webcit.init.d index 942dd9bab..d523c3420 100644 --- a/www-servers/webcit/files/webcit.init.d +++ b/www-servers/webcit/files/webcit.init.d @@ -1,28 +1,36 @@ #!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ +CITSERVER=${SVCNAME#*.} +if [ -n "${CITSERVER}" ] && [ ${SVCNAME} != "webcit" ]; then + WCPID="/var/run/webcit.${CITSERVER}.pid" +else + WCPID="/var/run/webcit.pid" +fi + depend() { need net } start() { - ebegin "Starting WebCit" - start-stop-daemon --start --quiet --background \ - --exec /usr/sbin/webcit -- $WEBCIT_OPTS + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --background \ + --exec /usr/sbin/webcit --make-pidfile \ + --pidfile "${WCPID}" -- $WEBCIT_OPTS eend $? "Failed to start WebCit" } stop() { - ebegin "Stopping WebCit" - start-stop-daemon --stop --quiet \ - --exec /usr/sbin/webcit - eend $? "Failed to stop WebCit" + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --exec /usr/sbin/webcit --pidfile "${WCPID}" + eend $? "Failed to stop ${SVCNAME}" } restart() { - ebegin "Restarting WebCit" + ebegin "Restarting ${SVCNAME}" svc_stop && sleep 3 && svc_start eend $? "Failed to restart WebCit" } |