Subversion Repositories DevTools

Rev

Rev 848 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 848 Rev 850
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
-
 
2
#set -x
2
#
3
#
3
# buildtool     This shell script takes care of starting and stopping
4
# buildtool     This shell script takes care of starting and stopping
4
#               buildtool.
5
#               buildtool.
5
#
6
#
6
# Note: This must be a 'sh' compatible script
7
# Note: This must be a 'sh' compatible script
Line 17... Line 18...
17
}
18
}
18
 
19
 
19
start() {
20
start() {
20
	# Start daemons.
21
	# Start daemons.
21
        check_running
22
        check_running
22
	if [ $pid ]; then
23
	if [ "$pid" ]; then
23
          echo 'running'
24
          echo 'running'
24
        else
25
        else
25
          echo 'starting'
26
          echo 'starting'
26
          su - buildadm -c 'source /etc/profile;jats eprog /home/buildadm/buildtool/abtlaunch 2>/tmp/buildtool 1>&2' &
27
          su - buildadm -c 'source /etc/profile;jats eprog /home/buildadm/buildtool/abtlaunch 2>/tmp/buildtool 1>&2' &
27
	fi
28
	fi
Line 30... Line 31...
30
stop() {
31
stop() {
31
	# Stop daemons.
32
	# Stop daemons.
32
        check_running
33
        check_running
33
        echo "check_running returned $pid"
34
        echo "check_running returned $pid"
34
 
35
 
35
	if [ $pid ]; then
36
	if [ "$pid" ]; then
-
 
37
        for kpid in $pid ; do
36
          echo "killing $pid"
38
            echo "killing $kpid"
37
          kill -9 $pid 2>/dev/null 1>&2
39
            kill -9 $kpid 2>/dev/null 1>&2
-
 
40
        done
38
        else
41
        else
39
          echo 'not running'
42
          echo 'not running'
40
        fi
43
        fi
41
}
44
}
42
 
45
 
43
status() {
46
status() {
44
	# Stop daemons.
47
	# Stop daemons.
45
        check_running
48
        check_running
46
 
49
 
47
	if [ $pid ]; then
50
	if [ "$pid" ]; then
48
          echo 'running'
51
          echo 'running'
49
        else
52
        else
50
          echo 'not running'
53
          echo 'not running'
51
        fi
54
        fi
52
}
55
}