<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00008chxeASAQOkta Classic EngineAdministrationAnswered2020-06-05T01:12:21.000Z2020-06-05T00:54:28.000Z2020-06-05T01:12:21.000Z

JohnA.96687 (Customer) asked a question.

LDAP Agent sysV start/stop script functionality

I have the Okta LDAP agent installed on CentOS 7.8 and have observed that while the sysV init script that ships with the package will start the agent, it will not stop the agent.

 

Has anyone else observed this behavior?

 

I've had a look at the script and it's unimpressive. Given that all of the Red Hat family is now systemd, wouldn't a unit file be more appropriate?

 


  • JohnA.96687 (Customer)

    Turns out it was right in front of me. Hey Okta... fix your script. The stop section reads....

     

    stop() {

       if $STATUS > /dev/null; then # <---- this is the offending line

           echo -n $"Stopping $ProgramName "

           if [[ $UID -ne 0 ]]; then

               ReturnValue=1

               $FAIL

           else

               JOBID=$(eval echo $JOBID)

               $KILL $JOBID

               rm -f $PIDFile

               ReturnValue=$?

               [[ $ReturnValue -eq 0 ]] && rm -f $LOCK

           fi

           echo

           return $ReturnValue

       fi

    }

     

    It should read:

     

    stop() {

       if ! $STATUS > /dev/null; then # <-- this is how it should read

           echo -n $"Stopping $ProgramName "

           if [[ $UID -ne 0 ]]; then

               ReturnValue=1

               $FAIL

           else

               JOBID=$(eval echo $JOBID)

               $KILL $JOBID

               rm -f $PIDFile

               ReturnValue=$?

               [[ $ReturnValue -eq 0 ]] && rm -f $LOCK

           fi

           echo

           return $ReturnValue

       fi

    }

     

    $100 for my time please.

    Expand Post
This question is closed.
Loading
LDAP Agent sysV start/stop script functionality