In Jira there is a fixed role “project lead” for each single project which is assigned in the projects configuration. The only default use of this role is as the default assigne of created issues. The problem here is that you can’t change this behaviour (see http://jira.atlassian.com/browse/JRA-3523).

So if you assign “project lead” to the administrative project lead, the mailbox of this person will be filled up with messages on issue creation. This might not be exactly what you wanted.

What possibilities are there to avoid such a problem? (Some only for Jira Enterprise).

  1. Using the role “project lead” as a proxy between customers and project team members. In this case don’t use the role “project lead” in your permission scheme, define your own role like “project manager” or similiar and use this instead. And:
    1. Assign “project lead” to a moderator or support team member.
    2. Assign “project lead” to a dummy user with a catch-all IMAP mailbox.
  2. Allow unassigned issues: Check admin -> global-settings for “allow unassigned issues” and set this in the project configuration as default
  3. You can configure a different default assignee for each component of a project. See http://www.atlassian.com/software/jira/docs/latest/component_management.html
  4. Edit you current Notification Scheme and remove Current Assignee from Notification on Issue Created.

In der deutschen Jira-Version wird das Datumsformat unter Administration – Globale Einstellungen Gestaltung eingestellt.
Hier ist ein Beispiel:

Datums-/Zeitformate
                            Format   Beispiel
  Zeitformat           HH:mm   22:28
  Datumsformat   EEEE HH:mm   Freitag 22:28
  Vollständiges Datums-/Zeitformat   dd. MMM yyyy HH:mm   21. Nov 2008 22:28
  Format Tag/Monat/Jahr   dd. MMM yyyy   21. Nov 2008
  Format Datumsauswahl (Format javascript)   dd. MMM yyyy (%e. %b %Y)   21. Nov 2008
  Format Datums-/Zeitauswahl (Format javascript)   dd. MMM yyyy HH:mm (%e. %b %Y %H:%M)   21. Nov 2008 22:28

Dabei muss man das Format für die Auswahl in Formularfeldern per JavaScript in einer externen Konfigurationsdatei einstellen:
WEB-INF/classes/jira-application.properties

Ein Beispiel:

# These two properties need to match for the datepicker to perform correctly
# The first date is in Java format
# (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html).
# The second in unix format (see the FORMAT section of http://unixhelp.ed.ac.uk/CGI/man-cgi\
?date)
# Please note that the following options are not recognised: %c %D %E, %F, %G, %g, %h %r %R\
 %T %x %X %z %Z - _ ^ #
# After editing ensure the date picker creates valid dates, we also recommend you make this\
 format the same as Day/Month/Year Format
# in the administration section of JIRA
jira.date.picker.java.format = dd. MMM yyyy
jira.date.picker.javascript.format = %e. %b %Y

# These two properties need to match for the datetime picker to perform correctly
# The first date is in Java format
# (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html).
# The second in unix format (see the FORMAT section of http://unixhelp.ed.ac.uk/CGI/man-cgi\
?date)
# Please note that the following options are not recognised: %c %D %E, %F, %G, %g, %h %r %R\
 %T %x %X %z %Z - _ ^ #
# After editing ensure the date time custom field picker creates valid dates
jira.date.time.picker.java.format = dd. MMM yyyy HH:mm
jira.date.time.picker.javascript.format = %e. %b %Y %H:%M

Here a very simple init script tested on Suse SLES 10. An other good way to create one is looking at the init-Script for tomcat or using just it and installing Jira as WAR into tomcat.

#!/bin/bash
# Jira startup script
# install:
# copy to /etc/init.d/jirad
# ln -s /etc/init.d/jirad /sbin/rcmy-jirad
# insserv /etc/init.d/jirad
 
### BEGIN INIT INFO
# Provides:          jirad
# Required-Start:    $local_fs $network
# Required-Stop:
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: Starts Jira server
# Description:       Starts Jira Issue Tracking
### END INIT INFO
# Based on script at  http://confluence.atlassian.com/pages/viewpage.action?pageId=183148
 
RUN_AS_USER=jico
CATALINA_HOME=/opt/jira
 
start() {
        echo "Starting Jira: "
        if [ "x$USER" != "x$RUN_AS_USER" ]; then
          su - $RUN_AS_USER -c "$CATALINA_HOME/bin/startup.sh"
        else
          $CATALINA_HOME/bin/startup.sh
        fi
        echo "done."
}
stop() {
        echo "Shutting down Confluence: "
        if [ "x$USER" != "x$RUN_AS_USER" ]; then
          su - $RUN_AS_USER -c "$CATALINA_HOME/bin/shutdown.sh"
        else
          $CATALINA_HOME/bin/shutdown.sh
        fi
        echo "done."
}
 
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        sleep 10
        #echo "Hard killing any remaining threads.."
        #kill -9 `cat $CATALINA_HOME/work/catalina.pid`
        start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
esac
 
exit 0

This is an addition to my post Convenient SSH on Linux cause I was suprised finding that KDE is run from ssh-agent per default.

# ps aux | grep ssh-agent
userx    6784  0.0  0.0   4480   816 ?        Ss   19:02   0:00 /usr/bin/ssh-agent /usr/bin/gpg-agent --daemon --sh --write-env-file=/home/userx/.gnupg/gpg-agent-info-myhome /usr/bin/startkde

So, first, how can you disable this?

In /etc/X11/Xsession.options :

# cat /etc/X11/Xsession.options
# See Xsession.options(5) for an explanation of the available options.
allow-failsafe
allow-user-resources
allow-user-xsession
use-ssh-agent
use-session-dbus

you can disable use-ssh-agent. This option will be used by
/etc/X11/Xsession.d/90x11-common_ssh-agent
see there for details.

If you want to use the running ssh-agent you can add your keys on startup by putting this script to .kde/Autostart

#!/bin/sh
# set SSH_ASKPASS if not set elsewhere
# export SSH_ASKPASS=/usr/bin/ssh-askpass
for f in /home/userx/.ssh/mykeys/*_dsa ; do ssh-add $f </dev/null ; done ; 

Also check the related ubuntu bugs

After spending a day and a night I have got this working. Not perfectly as restarting Xserver by CTRL+ATL+BACKSPACE would show a scrumbled screen (see below for a fix).
This is the hardware configuration I tried to get working:
The Laptop “Dell Latitude D810″ ist connected to a docking station “D/Port Advanced Port Replicator”, the external monitor is connected to the DVI-D Port of the docking station. I wanted a big desktop stretched over both monitors, laptop and external, that makes sense cause the laptop can be fixed in a upright position by the D/View computer stand, the resolution of both monitors is 1680×1050.

The main steps were:

  1. Updating the fresh installed system.
  2. Removing the xorg-driver-fglrx driver package if installed.
  3. Downloading the latest ati fglrx driver from http://ati.amd.com/support/drivers/linux/linux-radeon.html and installing them by just running the downloaded ati-driver-installer-8-11-x86.x86_64.run as root.
  4. Reading Unofficial Ati Linux Driver Wiki
  5. Following descriptions in Dual Monitor Support With Binary, ATI-Only Big-Desktop
  6. Running aticonfig according to the descriptions:
    root@myhome:# aticonfig --initial --overlay-type=Xv
    root@myhome:# aticonfig --desktop-setup=horizontal --sync-vsync=on --add-pairmode=Width0xHeight0+Width1xHeight1
  7. Tuning my xorg.conf by adding some options to the device section.

To make this descriptions complete here is my xorg.conf :

# xorg.conf (X.Org X Window System server configuration file)

Section "ServerLayout"
  Identifier     "Default Layout"
  Screen      0  "aticonfig-Screen[0]-0" 0 0
  InputDevice    "Synaptics Touchpad"
EndSection

Section "Files"
EndSection

Section "Module"
EndSection

Section "InputDevice"
  Identifier  "Generic Keyboard"
  Driver      "kbd"
  Option      "XkbRules" "xorg"
  Option      "XkbModel" "pc105"
  Option      "XkbLayout" "de"
  Option      "XkbOptions" "lv3:ralt_switch"
EndSection

Section "InputDevice"
  Identifier  "Configured Mouse"
  Driver      "mouse"
  Option      "CorePointer"
EndSection

Section "InputDevice"
  Identifier  "Synaptics Touchpad"
  Driver      "synaptics"
  Option      "SendCoreEvents" "true"
  Option      "Device" "/dev/psaux"
  Option      "Protocol" "auto-dev"
  Option      "HorizEdgeScroll" "0"
EndSection

Section "Monitor"
  Identifier   "Configured Monitor"
EndSection

Section "Monitor"
  Identifier   "aticonfig-Monitor[0]-0"
  Option      "VendorName" "ATI Proprietary Driver"
  Option      "ModelName" "Generic Autodetecting Monitor"
  Option      "DPMS" "true"
EndSection

Section "Device"
  Identifier  "Configured Video Device"
EndSection

Section "Device"
  Identifier  "aticonfig-Device[0]-0"
  Driver      "fglrx"
  Option      "VideoOverlay" "on"
  Option      "OpenGLOverlay" "off"
  Option   "Mode2"         "1680x1050" #Resolution for second monitor
  Option      "DesktopSetup" "horizontal"  #Enable Big Desktop
  Option "DesktopSetup" "LVDS,AUTO" #the types of monitors that is connected LVDS = LCD, CRT, AUTO
       Option "EnablePrivateBackZ" "yes" #Enable 3d support <= May Not Work
       Option "HSync2" "65" #This sets the horizontal sync for the secondary display. 
       Option "VRefresh2" "60" #This sets the refresh rate of the secondary display.
  Option      "Capabilities" "0x00000800"
  Option      "PairModes" "0x0+0x0"
  Option      "EnableMonitor" "lvds,tmds1" # may be you dont need this
  BusID       "PCI:1:0:0"
EndSection

Section "Screen"
  Identifier "Default Screen"
  Device     "Configured Video Device"
  Monitor    "Configured Monitor"
EndSection

Section "Screen"
  Identifier "aticonfig-Screen[0]-0"
  Device     "aticonfig-Device[0]-0"
  Monitor    "aticonfig-Monitor[0]-0"
  DefaultDepth     24
  SubSection "Display"
    Viewport   0 0
    Depth     24
  EndSubSection
EndSection

First I could fix the freezing of X on logout by disabling acpi. But then I found at Wiki Troubleshooting some hints and had success with:
File: /etc/kde3/kdm/kdmrc
TerminateServer=true
didn’t work alone. Added
sudo /usr/sbin/update-rc.d -f atieventsd remove
with success even with acpi enabled.

Grub menu disabling acpi:

# set this in /boot/grub/menu.lst
title           Ubuntu 8.04.1, kernel 2.6.24-21-generic ACPI=off
root            (hd0,5)
kernel          /boot/vmlinuz-2.6.24-21-generic root=UUID=45c3fc6b-bbcb-4320-8470-9228582f3115 ro quiet pci=noacpi acpi=off
initrd          /boot/initrd.img-2.6.24-21-generic

Say you create XHTML from XML using XSLT transformation (like me from Docbook to XHTML chunks using Docbook XSLT Stylesheets ) and you want to include some Javascript in the XHTML output.

If you serve your XHTML pages with mime-type: application/xhtml+xml rather then text/html , you will have to take care of xml-relevant characters within the script code (see Javascript and XHTML for a short explanation):

<script type="text/javascript">
/* <![CDATA[ */
// content of your Javascript goes here
/* ]]> */
 
or 
 
<script type="text/javascript">
// <![CDATA[ 
 content of your Javascript goes here
//]]>
</script>

Generating this output with xslt can be a little bit tricky. My solution (probably better exist) uses a trick shown in http://www.w3.org/TR/xslt#section-XML-Output-Method:

... xslt code ...
<script type="text/javascript">
	<xsl:text disable-output-escaping="yes">
	<![CDATA[//<![]]><![CDATA[CDATA[]]>
//javascript
	<![CDATA[//]]><![CDATA[]]]]><![CDATA[>]]>
        </xsl:text>
</script>
... xslt code

Am 17. Juni 2008 fanden in Brüssel zwei Meetings statt, die die Entwicklung des Handle Systems betreffen. Zum Einen der Handle System Workshop (erstmalig in Europa), zum Anderen ein Meeting der International DOI Foundation .

IDF Meeting 

DOIs sind nicht anderes als Handles mit zusätzlichen Regelungen, einem Layout und Schema sowie Services drumherum. DOIs und der DOI Resolver sind ein Bestandteil des globalen Handle PID und Resolution Infrastructure.

Den deutschsprachigen Raum betreffend würde ich die Präsentation des TIB Hannover hervorheben: Access to Non-textual Information: The Big Challenge for Libraries – What the DOI System Can Do to Help .

  • The German Research Foundation (DFG) has started the project Publication and Citation of Scientific Primary Data to increase the accessibility of scientific primary data, starting with the field of earth science.
  • The German National Library of Science and Technology (TIB) is now established as a “non-commercial” DOI-registration agency for scientific primary data as a member of the International DOI Foundation (IDF).

Die wissenschaftlichen Daten sollen in den Bibliothekskatalog und über DOI referenzierbar und mit den Artikeln u.ä. verknüpft werden. Bspw. bekommen Kristall-Strukturen eine DOI verpasst.

Handle System Workshop 2008

Wer nutzt es?

  • Library of Congress
  • DTIC (Defense Technical Information Center)
  • IDF (International DOI Foundation)
    • CrossRef (scholarly journal consortium, representing >2K publishers & societies)
    • CAL (Copyright Agency Ltd – Australia)
    • MEDRA (Multilingual European DOI Registration Agency)
    • Nielsen BookData (bibliographic data – ISBN)
    • R.R. Bowker (bibliographic data – ISBN)
    • Office of Publications of the European Community (OPOCE)
    • German National Library of Science and Technology (TIB)
    • Wanfang Data
  • OECD
  • NASA
  • National Agricultural Library/USDA
  • DSpace (MIT + HP)
  • ADL (DoD Advanced Distributed Learning initiative)
  • Los Alamos National Laboratory Research Library
  • Australian Dept. of Ed., Sci, and Training (DEST) – PILIN project
  • Clarin (Common Language Resources and Technology Infrastructure)

Interessant ist das PILIN Project, die genau das leisten, was für einen nachhaltigen Handle System bzw. PID Infrastruktur Betrieb nötig wäre. Der Vortrag gibt eine gute Übersicht über die Probleme und Tragweite, kann als guter Ausgangspunkt benutzt werden für eigene Überlegungen. Unter anderem wird auf FRBR Bezug genommen.

Zu erwähnen ist Crossref.org ebenfalls mit einem Vortrag anwesend.

CLARIN macht Ähnliches wie wir, siehe der Vortrag : “The CLARIN project is a large-scale pan-European collaborative effort to create, coordinate and make language resources and technology available and readily useable. As one of its goals CLARIN will create a federation of LR repositories and aims to create a unified resource registry using persistent identifiers.” Single resource identifier system for all “published” resources using the Handle System. Unified metadata catalogue. Identity federation using Shibboleth. Zusätzlich Problem mit verteilten Registries. Deswegen werden dort auch Tools entwickelt zum Verschieben, Wiederherstellen usw. von Handles – etwas was mit der Übernahme von externen Handles bspw. DOIs von Nature usw. interessant werden könnte.

Damit zusammenhängend (DAM-LR Distributed Access Management for Language Resources) Engagement der MPG:

  • Single resource identifier system for all “published” resources using the Handle System. Unified metadata catalogue. Identity federation using Shibboleth. Zusätzlich Problem mit verteilten Registries. Deswegen werden dort auch Tools entwickelt zum Verschieben, Wiederherstellen usw. von Handles – etwas was mit der Übernahme von externen Handles bspw. DOIs von Nature usw. interessant werden könnte.
  • Proposal within the MPG to support a MPG wide PID registration service based on the HS.
  • Run by MPG computing center GWDG

Neue Entwicklungen

Dazu konsultiere man Introduction and Handle System Update ab slide 20 . Unter anderem

  • Konfigurierbare und parametrisierbare Auflösung auf mehrere URLs
  • Auflösung von nicht registrierten Handles nach Namensmustern, spart Speicherplatz, wird realisiert über neues Storage Modul
  • Mehr globale Mirrors
  • Update der RFCs
  • Registrierung von Handles als URI Schema (im Augenblick : info:hdl )

Handle soll innerhalb von GRIDS benutzt werden um Objekte verteilt zu identifizieren: Grid Computing

Handle Types

Die bisherigen Typen für Handle Values sollen über eine Registry erweiterbar und formalisierbar werden. Beteiligung der Nutzer.

Siehe Handle Value Types.

This post was published originally in the intranet wiki of the Head Quarter (VZG) Common Library Union (GBV). Some friends asked me to make it accessible for them. To import the confluence post to wordpress one can just copy the html source code.

Bei dem Event für Entwicklung von Digitalen Repositories trafen sich dieses Jahr ca. 500 Teilnehmer aus aller Welt in  Southampton (UK) (Homepage der Konferenz) . Wer am Montag anreiste, konnte in der Dämmerung noch einen Spaziergang durch die (Hafen-)Stadt machen und ein paar eher zu dunkel geratene Fotos schießen (von hier aus startete unter anderem die Titanic).  Danach blieb wenig Zeit, der Bus holte die Teilnehmer um 8:30 vom Hotel ab, ab 9:00 dann zahlreiche Vorträge und abends die ergänzenden Veranstaltungen und Gespräche, gegen 11 p.m. trudelte man dann noch zu ein paar Ale oder Bitter im Hotel ein. Der 30min Nachtmarsch von der Uni, wo die Veranstaltungen stattfanden, zum Hotel war da eine willkommene Abwechslung zum sonst vorherrschenden Dauersitzen in Vorlesungssälen, deren Ausstattung eindeutig aus Zeiten vor der großen Laptopflut stammt.

Hier einige meiner inhaltlichen, sicher subjektiv-selektiven Eindrücke, teilweise mit Links teilweise aus dem Bauch oder Gedächtnis, gerne auch als Grundlage einer mündlichen Diskussion. Wer Details nachlesen möchte sei auf das Repository der Konferenz verwiesen.

  • Die wichtigsten Entwicklungen kommen vor allem aus den USA, Australien und UK. In Dänemark scheint auch einiges los zu sein. Deutschland war diesmal mit eSciDoc (Karlsruhe+MPDL) präsent.
  • Um ein größeres Repository aufzubauen, wurde die auf Erfahrung beruhende Aufwandsschätzung von 50 Mann/Frau-Jahren genannt.
  • Die “Großen” riechen Lunte und engagieren sich zunehmend:
  • Motivationen für den Aufbau eines Reps: Archivierung, Veröffentlichung, Werbung (für Uni u.ä.), Erstellung von Metriken (Citation usw.), Neuerfindung von Universitätsverlagen, neue Geschäftsprozesse.
  • Die große Schwierigkeit: Wie Daten in’s Reps bringen (politische und technische Aspekte) – a) per Gesetzt digitale Veröffentlichung von Dissertationen u.ä. erzwingen, b) Textmining . Der Trend geht dahin vorhandene, dem User gewohnte Tools und Standards zu nutzen: also bspw. Word, Atom-Protokoll… Zu technischen Fragen siehe auch Breaking the Repository Ingest Barrier.
  • SWORD – lightweight protocol für Ingest (Speicherung und Einbringen) – als ein Profil des ATOM Publishing Protokolls
  • Natürlich war und ist, wie nicht anders zu erwarten: “Wie verbinde ich den ganzen Kram mit Web2.0 zu Open Repositories 2.0?” ein zentrales Thema.
  • Wie Daten verwaltbar aufbereiten und speichern, wie austauschbar machen zwischen unterschiedlichen Repositories?
  • Textmining wird zunehmend an Bedeutung gewinnen.
  • Woher sollen semantische Informationen zu den Objekten kommen? vom Verlag, von Bibliothekaren, ( von Nutzern, vom Autor ?)
  • Auf Spezialgebieten sind schon beeindruckende Resultate erzielt worden wie bspw. CrystalEyefür Analyse chemischer Verbindungen zeigt, hier werden automatisch Daten aus heterogenen Quellen gesammelt und ausgewertet, enthaltene Beschreibungen von neuen chem. Verbindungen werden extrahiert und visuell als auch als Formel dargestellt. Die Verweise auf die Quellen gesammelt. (siehe auch Session 4b – Scientific Repositories )
  • Ein wichtiges Thema ist das sog. cross-repository browsing, also das Suchen in unterschiedlichen Reps unter einer Oberfläche. Ähnlich einem Portal für Z3950-Kataloge. Hier wurde richtags( Vortrag: Rich Tags: Cross-Repository Browsing) vorgestellt, mit einem, wie ich finde, beachtenswerten User-Interface.
  •  NCore von Cornell ist der Konkurrent zu eSciDoc auf dem Markt, ist OpenSource und basiert auch auf Fedora, einige bemerkenswerte Features, und  praktisch in größeren Maßstäben erprobt. (Vortrag: The NCore Platform: An Open-Source Suite of Tools and Services for Implementing Digital Libraries), die komplette Vergleichsmatrix zu erstellen ist sicher ein Projektchen für sich, nur ein Fakt: eSciDoc unterstützt Publikations-Workflows, was bei NCore nicht der Fall ist.
  • Mittlerweile haben sich abhängig vom gewählten Basis-Softwaresystem unterschiedliche Nutzergruppen innerhalb der Reps-Landschaft herausgebildet. Also gab es für  Fedora, DSpace und und EPrints jeweils parallele Tagesveranstaltungen: Subject: User Groups
  • Erwähnenswert ist die neue OAI-ORE ( Object Reuse and Exchange (OAI-ORE) ) Initiative (extra Veranstaltung am Freitag, da saß ich aber leider schon im Flugzeug): http://www.openarchives.org/ore/ - eine Art Austauschprotokoll, um Informationen über Digitale Objekte zwischen verteilten Reps auszutauschen

… so, das soll’s erstmal sein hier. Mehr zu lesen, hat sowieso niemand die Zeit … und auch bis hierher werden es die Wenigsten geschafft haben … ist ja auch im Augenblick noch ziemlich “nerdy”. Insgesamt eine interessante und bewegte Veranstaltung, die den Eindruck bestätigt, dass um wirklich aktiv an der neuen Welt der Digitalen Objekte teilzunehmen, es einer größeren Investition bzw. Commitments bedarf.

Here is an init script to control hudson start up at boot time. It is tested on SLES 10 . I am not commenting it in detail here, nevertheless you are welcome to ask and leave comments. It’s rather beta but I hope that it could be useful as a starting point.

#!/bin/bash
# Author: Konstantin.rekk@gbv.de, 2008
# Using ideas from http://developer.novell.com/wiki/index.php/Writing_Init_Scripts
#
# install:
# copy to /etc/init.d/gbv-hudson-integration
# ln -s /etc/init.d/gbv-hudson-integration /sbin/rcgbv-hudson-integration
# insserv /etc/init.d/gbv-hudson-integration
 
 
### BEGIN INIT INFO
# Provides:          gbv-hudson-integration
# Required-Start:    $local_fs $network
# Required-Stop:
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: Starts the hudson server for CI 
# Description:       Starts Continuous Integration System for VZG SOA
### END INIT INFO
 
# to avoid conflict with functions local $1
ARG=$1
 
APP="hudson"
 
HUDSON_USER=soarun
HUDSON_GROUP=soarun
export HOME=/home/${HUDSON_USER}
export VZGSOA_HOME=${HOME}/soa-workarea
 
# include rc.status functions 
test -s /etc/rc.status && . /etc/rc.status && rc_reset
 
# use test_for_app <appl|file> (x|f)
test_for_app ()
{
    app_found=0
    if [ "f" = "$2" ] && [ -f $1 ]; then
        app_found=1
    elif [ "x" = "$2" ] && [ -x $1 ]; then
        app_found=1
    fi
    if [ 0 = $app_found ]; then
        echo -n "Warning:  Couldn't find $1"
        if [ "$ARG" = "stop" ] ; then
            rc_failed 0
        else
            rc_failed 5
        fi
        rc_status -v
        rc_exit
    fi
}
 
test_for_app $VZGSOA_HOME/vzgsoa.env f
test_for_app $VZGSOA_HOME/integration/integration.env f
. $VZGSOA_HOME/vzgsoa.env
. $VZGSOA_HOME/integration/integration.env
 
HUDSON_CMD="${JAVA} -jar ${HUDSON_WAR} --httpPort=${CI_HTTP_PORT} --argumentsRealm.passwd.hudson=${HUDSON_PW} --argumentsRealm.roles.hudson=admin"
 
HUDSON_PIDFILE=/var/run/hudson.pid
HUDSON_LOG=/var/log/hudson
 
usage ()
{
    echo ""
    echo "Usage: $0 <command> "
    echo ""
    echo "where <command> is one of the following:"
    echo "    start - start $APP if not running"
    echo "    stop - stop $APP if running"
    echo "    status - report whether $APP is running"
    echo "    restart - stop and restart $APP"
    echo "    usage, help - print this message"
}
 
get_pid_for_cmd ()
{
    for pid in `ls /proc`; do
        if [ -d /proc/$pid ] && [ -f /proc/$pid/cmdline ]; then
            if [ "$1" = "$(</proc/$pid/cmdline)" ]; then
		# return with current pid 
                return
            fi
        fi
    done
    pid=0
}
 
# checkport <port>
# returns port_used
check_port()
{
	port=$1
	if netstat -nlept 2>/dev/null | grep --regexp=":$port " &>/dev/null ; then
        	port_used=1
    	else
        	port_used=0
    	fi
}
 
# checks hudson, sets/returns status - 
# 0 if pidfile same as pid, running
# 3 no pidfile, not running (what with running?)
# 2 pidfile, but no process (remove file ...), not running
# 1 pidfile != pid, but running
# 4 no pidfile, but running
# 
# @todo: check port usage
check_hudson() 
{
	get_pid_for_cmd `eval echo ${HUDSON_CMD} | sed -e 's/ //g'`
 
	if [ -f $HUDSON_PIDFILE ]; then
		pidfile_pid=`cat $HUDSON_PIDFILE`
		if [ 0 = $pid ]; then
			status=2
		elif [ "$pid" = "$pidfile_pid" ]; then
			status=0;
		else 
			status=1;
		fi		
	else 
		if [ 0 = $pid ]; then
			status=3;
		else 
			status=4;
		fi
	fi
 
}
 
 
test_for_app ${JAVA} x
test_for_app ${HUDSON_WAR} f
 
case "$1" in
    start)
        check_hudson
        case "$status" in
            0)
                echo "${APP} already running"
		rc_failed 0
		rc_status -v1
           	rc_exit
                ;;
	    1|4)
		echo "${APP} seems running but pidfile is not up to date or doesn't exist, please check!"
		rc_failed
                rc_status -v1
                rc_exit
		;;
            2)
                echo "Found stale pidfile for ${APP} - unclean shutdown?"
                rm ${HUDSON_PIDFILE}
                ;;
            3)
                # not running - ok
        	check_port $CI_HTTP_PORT
		if [ $port_used = 1 ]; then
			echo "Port $CI_HTTP_PORT already in use, pleas check!"
                	rc_failed
                	rc_status -v1
                	rc_exit
		fi 
                ;;
            *)
                echo "Check for ${APP} failed"
                rc_failed
                rc_status -v1
                rc_exit
        esac
 
        echo -n "Starting ${APP}"
        startproc -f -u $HUDSON_USER -g $HUDSON_GROUP -p ${HUDSON_PIDFILE} ${HUDSON_CMD} >> ${HUDSON_LOG} 2>&1
        if ! [ 0 = $? ]; then
            echo -n "(Error - "
            case $? in
                2)
                    echo -n "invalid arguments"
                    ;;
                4)
                    echo -n "insufficient permission"
                    ;;
                5)
                    echo -n "no such program"
                    ;;
                7)
                    echo -n "launch failure"
                    ;;
                *)
                    echo -n "unspecified error"
                    ;;
            esac
            echo -n ")"
            rc_failed
            rc_status -v1
            rc_exit
        fi
	# removing spaces from commandline to be able to compare with /proc/<pid>/cmdline
        get_pid_for_cmd `eval echo ${HUDSON_CMD} | sed -e 's/ //g'`
        if [ 0 = $pid ]; then
            echo "Warning - Couldn't obtain PID for ${APP} "
        else
            echo $pid > ${HUDSON_PIDFILE}
        fi
        rc_status -v
        ;;
    stop)
        if [ $1 = "stop" ]; then
            check_hudson
	    if ! [ $status = 0 ]; then
		echo "Warning - not running!"
	    fi
            killproc -p ${HUDSON_PIDFILE} -t 10 ${JAVA}
            rc_status -v
        fi
        ;;
    status)
        check_hudson
	case "$status" in
        0)
            echo -n "(running)"
            rc_failed 0
            ;;
	1|4)  
	    echo -n "(running)"
	    echo -n  "Warning - PID corrupted"
            rc_failed 0
            ;;
        2)
            echo "(not running)"
            echo -n "Warning - PID file found"
            rc_failed 3
            ;;
        3)
            echo -n "(not running)"
            rc_failed 1
            ;;
        *)
            echo "(unknown)"
            echo "Warning - Couldn't get status"
            rc_failed 1
            rc_status -v1
            rc_exit
    esac
    rc_status -v
        ;;
    restart)
        $0 stop &>/dev/null
        $0 start &>/dev/null
        rc_status -v
        ;;
    usage|help)
        usage
        rc_exit
        ;;
    *)
        usage
        rc_failed 1
        rc_status -v
        rc_exit
esac

Subversion clients store authentication data in ./subversion/auth for each realm.

To remove cached data go to “.subversion/auth/svn.simple” folder and delete the particular file.
There will be key (K)-value (V) pairs. “username” and “svn:realmstring” together can identify the user.
So use for example:

grep servername ./*

to find the right file.

Disable caching by opening “config” file in “.subversion” folder and setting the values of “store-passwords” and “store-auth-creds” to “no” or use –no-auth-cache as command line argument.

« Previous PageNext Page »