--- /dev/null
+#!/bin/sh
+
+GLITE_LOCATION=/opt/glite
+GLITE_USER=glite
+GLITE_LOCATION_VAR=/opt/glite/var
+
+PROXY_REPOSITORY="$GLITE_LOCATION_VAR/spool/glite-renewd"
+
+[ -f /etc/glite.conf ] && . /etc/glite.conf
+[ -f $HOME/.glite.conf ] && . $HOME/.glite.conf
+
+#[ -f $GLITE_LOCATION/etc/lb.conf ] && . $GLITE_LOCATION/etc/lb.conf
+#[ -f $GLITE_LOCATION_VAR/etc/lb.conf ] && . $GLITE_LOCATION_VAR/etc/lb.conf
+
+start()
+{
+ [ -n "$GLITE_HOST_CERT"] X509_USER_CERT="$GLITE_HOST_CERT"
+ [ -n "$GLITE_HOST_KEY" ] X509_USER_KEY="$GLITE_HOST_KEY"
+
+ echo -n Starting ProxyRenewal Daemon: glite-proxy-renewd ...
+
+ if [ ! -d "$PROXY_REPOSITORY" ]; then
+ mkdir -p $PROXY_REPOSITORY || exit 1
+ chown $GLITE_USER $PROXY_REPOSITORY
+ chmod 0700 $PROXY_REPOSITORY
+ fi
+
+ su $GLITE_USER -c "$GLITE_LOCATION/bin/glite-proxy-renewd" \
+ -r $PROXY_REPOSITORY && echo " done"
+}
+
+stop()
+{
+ echo -n "Stopping ProxyRenewal Daemon: glite-proxy-renewd ..."
+ PIDS=`ps -C glite-proxy-renewd -o pid --no-heading`
+ if [ -z "$PIDS" ]; then
+ echo " no process glite-proxy-renewd running"
+ exit 1
+ else
+ kill $PIDS && echo " done"
+ fi
+}
+
+status()
+{
+ PIDS=`ps -C glite-proxy-renewd -o pid --no-heading`
+ if ps p $PIDS >/dev/null 2>&1; then
+ echo glite-proxy-renewd running \($PIDS\)
+ return 0
+ fi
+
+ echo glite-proxy-renewd not running
+ return 1
+}
+
+case x$1 in
+ xstart) start;;
+ xstop) stop;;
+ xrestart) stop; start;;
+ xstatus) status;;
+ x*) echo usage: $0 start,stop,restart,status >&2
+ exit 1;;
+esac