Set LD_LIBRARY_PATH for overridden libcurl on RHEL6.
[shibboleth/cpp-sp.git] / configs / shibd-redhat.in
index fd80ee5..d3c0205 100644 (file)
@@ -14,9 +14,13 @@ shibd="@-PREFIX-@/sbin/shibd"
 SHIBD_USER=root
 pidfile=@-PKGRUNDIR-@/shibd.pid
 prog=shibd
-VER=`cat /etc/redhat-release | awk '{print $3}' | awk -F . '{print $1}'`
+#VER=`cat /etc/redhat-release | awk '{print $3}' | awk -F . '{print $1}'`
 RETVAL=0
 
+if [ -f /etc/sysconfig/shibd ] ; then
+    . /etc/sysconfig/shibd
+fi
+
 start() {
        echo -n $"Starting $prog: "
        if [ -f /var/lock/subsys/shibd ] ; then
@@ -30,18 +34,15 @@ start() {
                        fi
                fi
        fi
+
+#_RHEL6_       export LD_LIBRARY_PATH=/opt/shibboleth/lib:$LD_LIBRARY_PATH
        export SHIBD_PID=$pidfile
-       touch $pidfile
-       chown $SHIBD_USER:$SHIBD_USER $pidfile
+       touch $pidfile
+       chown $SHIBD_USER:$SHIBD_USER $pidfile
        if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
                /sbin/restorecon $pidfile
        fi
-       if [ 5 -le $VER ] ; then
-               daemon --user $SHIBD_USER --pidfile $pidfile $shibd -p $pidfile -f -w 30
-       else
-               daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
-       fi
+       daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
 
        RETVAL=$?
        echo
@@ -51,11 +52,7 @@ start() {
 
 stop() {
        echo -n $"Stopping $prog: "
-       if [ -f $pidfile -a 5 -le $VER ] ; then
-               killproc -p $pidfile shibd
-       else
-               killproc shibd
-       fi
+       killproc shibd
 
        RETVAL=$?
        echo