updated on Wed Jan 18 16:10:53 UTC 2012
[aur-mirror.git] / gt / gt.rc
blob9da4a17a84c847643923997065642275e0c0cee1
1 #! /bin/sh
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 [ -f /etc/conf.d/gt ] && . /etc/conf.d/gt
8 [ -z "$GLOBUS_LOCATION" ] && exit 1;
9 [ `id -u` -gt 0 ] && exit 1;
11 case "$1" in
12 start)
13 stat_busy "Starting globus container"
14 #su -c "$GLOBUS_LOCATION/sbin/globus-start-container-detached -nosec" - globus
16 $GLOBUS_LOCATION/sbin/globus-start-container-detached $OPTS >&- 2>&-
18 if [ $? -gt 0 ];then
19 stat_fail
20 else
21 [ -e /var/run/gt.pid ] && rm /var/run/gt.pid;
22 [ -e /var/log/gt.log ] && rm /var/log/gt.log;
23 ln -s $GLOBUS_LOCATION/var/container.pid /var/run/gt.pid
24 ln -s $GLOBUS_LOCATION/var/container.log /var/log/gt.log
25 add_daemon gt
26 stat_done
30 restart)
31 $0 stop
32 sleep 2
33 $0 start
36 stop)
37 stat_busy "Stopping globus container"
38 $GLOBUS_LOCATION/sbin/globus-stop-container-detached >&- 2>&-
40 if [ $? -gt 0 ];then
41 stat_fail
42 else
43 rm /var/run/gt.pid
44 rm_daemon gt
45 stat_done
50 echo "Usage: $0 {start|stop|restart}"
51 exit 2
53 esac
55 exit 0