Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r689 - branches/opensource/scripts/admin/test_server

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r689 - branches/opensource/scripts/admin/test_server


Chronological Thread 
  • From: "Apache" <apache AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r689 - branches/opensource/scripts/admin/test_server
  • Date: Thu, 24 Jan 2008 12:23:52 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: geus AT PSI.CH
Date: Thu Jan 24 12:23:51 2008
New Revision: 689

Log:
Improved starting of java and orbd processes: disabled ant spawn method in
order to capture stdout and stderr, moved all logging files to idok_server
tree, use start-stop-daemon to start ant

Removed:
branches/opensource/scripts/admin/test_server/logging.conf
Modified:
branches/opensource/scripts/admin/test_server/setup_test_server_ubuntu.sh

Modified:
branches/opensource/scripts/admin/test_server/setup_test_server_ubuntu.sh
==============================================================================
--- branches/opensource/scripts/admin/test_server/setup_test_server_ubuntu.sh
(original)
+++ branches/opensource/scripts/admin/test_server/setup_test_server_ubuntu.sh
Thu Jan 24 12:23:51 2008
@@ -104,52 +104,55 @@
# Startup scripts
#
cat > /etc/init.d/idok << "EOT"
-#!/bin/bash
+#!/bin/sh
+# Start/stop the cron daemon.
#
-# chkconfig: 2345 85 15
-# description: iDok Document Management System server.
+### BEGIN INIT INFO
+# Provides: idok
+# Required-Start: $syslog $time
+# Required-Stop: $syslog $time
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: iDok document management system services
+# Description: Starts all services required to run the iDok service
+# daemon and the iDok indexer
+### END INIT INFO
+
+. /lib/lsb/init-functions

IDOK_SRC_DIR=/home/toor/idok
IDOK_HOST=idokserver
IDOK_SERVER_ROOT=/var/lib/idok_server

-RETVAL=0
-
-start() {
- echo -n $"Starting iDok services: "
- # Start orbd on behalf of user www-data
- sudo -u www-data ant -f $IDOK_SRC_DIR/local-server.xml
-Dserver.hostname=$IDOK_HOST -Dserver.root.dir=$IDOK_SERVER_ROOT start-orbd
- RETVAL=$?
- [ $RETVAL -ne 0 ] && exit $RETVAL
- # Start dmssd on behalf of user www-data
- sudo -u www-data ant -f $IDOK_SRC_DIR/local-server.xml
-Dserver.hostname=$IDOK_HOST -Dserver.root.dir=$IDOK_SERVER_ROOT
start-server-sunorb
- RETVAL=$?
- echo
-}
-
-stop() {
- echo -n $"Shutting down iDok services: "
+case "$1" in
+start) log_daemon_msg "Starting iDok services" "idok"
+ start-stop-daemon --start --chuid www-data:www-data --background
--exec /usr/bin/ant -- -f $IDOK_SRC_DIR/local-server.xml
-Dserver.hostname=$IDOK_HOST -Dserver.root.dir=$IDOK_SERVER_ROOT start-orbd
+ start-stop-daemon --start --chuid www-data:www-data --background
--exec /usr/bin/ant -- -f $IDOK_SRC_DIR/local-server.xml
-Dserver.hostname=$IDOK_HOST -Dserver.root.dir=$IDOK_SERVER_ROOT
start-server-sunorb
+ log_end_msg $?
+ ;;
+stop) log_daemon_msg "Stopping iDok services" "idok"
# Brute force approach: Kill all java and orbd processes
killall java
killall orbd
- echo
-}
-
-case "$1" in
- start)
- start
+ log_end_msg $?
+ ;;
+restart) log_daemon_msg "Restarting iDok services" "idok"
+ # Brute force approach: Kill all java and orbd processes
+ killall java
+ killall orbd
+ start-stop-daemon --start --chuid www-data:www-data --background
--exec /usr/bin/ant -- -f $IDOK_SRC_DIR/local-server.xml
-Dserver.hostname=$IDOK_HOST -Dserver.root.dir=$IDOK_SERVER_ROOT start-orbd
+ start-stop-daemon --start --chuid www-data:www-data --background
--exec /usr/bin/ant -- -f $IDOK_SRC_DIR/local-server.xml
-Dserver.hostname=$IDOK_HOST -Dserver.root.dir=$IDOK_SERVER_ROOT
start-server-sunorb
+ log_end_msg $?
;;
- stop)
- stop
+reload|force-reload) log_daemon_msg "Reloading configuration files iDok
services" "idok"
+ # not supported
+ log_end_msg 1
;;
- restart|reload)
- stop
- start
+*) log_action_msg "Usage: /etc/init.d/cron
{start|stop|restart|reload|force-reload}"
+ exit 2
;;
- *)
- echo $"Usage: $0 {start|stop|restart}"
- exit 1
esac
+
EOT
chmod a+x /etc/init.d/idok




  • [idok-commit] idok commit r689 - branches/opensource/scripts/admin/test_server, Apache, 01/24/2008

Archive powered by MHonArc 2.6.19.

Top of Page