Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6914 dpurdie 1
#!/bin/bash
2
#
3
#   Wrapper script to start and restart the build tool
4
#   This script should be spawned by the init.d system
5
#
6
#   Killing abtD.jar will not stop the build system
7
#   as this script will respawn it
8
#
9
#   Best to kill the process group of this shell script
10
#
11
while true; do
12
    #
13
    #   Rotate logfiles for monitoring each session
14
    #   
15
    LOGFILE=/tmp/buildtool
16
    if [ -f $LOGFILE ] ; then
17
        for ii in 9 8 7 6 5 4 3 2 ; do
18
            last=$( expr $ii - 1 )
19
            [ -f $LOGFILE.$ii ]   && rm $LOGFILE.$ii
20
            [ -f $LOGFILE.$last ] && mv $LOGFILE.$last $LOGFILE.$ii
21
        done
22
        mv $LOGFILE $LOGFILE.1
23
    fi
24
    exec 2>$LOGFILE 1>&2
25
 
26
    #
27
    #   Launch the build tool
28
    #
29
    . /etc/profile
30
    unset GBE_PLATFORM
31
    echo $(date) Starting abtlaunch
32
    #jats vars -v
33
    jats -NoExportVars eprog /work/buildtool/abtlaunch
34
    echo $(date) abtlaunch stopped
35
    sleep 30
36
done
37