Symantec Access Management

  • 1.  wamui restart script with arguments

    Posted Dec 21, 2016 10:25 AM

    Hello,

    I have to start wamui always as background process "nohup ./run.sh &", just running ./run.sh would keep the terminal open forever and using ctrl+c would exit as well as shutdown wamui.

     

    Can you please provide run.sh script that takes stop|status|start arguments as input and coming out of shell terminal for R12.52 in Linux environment.

     

    Thank you,

    Raja Shravan



  • 2.  Re: wamui restart script with arguments

    Posted Dec 21, 2016 11:08 PM

    Hi Raja,

     

    It seems like an enhancement request that you suggest to have run.sh include stop|status|start arguments. It doesn't look like a question. If that's the case, we need to move the thread to Idea.

     

    Regards,

    Kar Meng



  • 3.  Re: wamui restart script with arguments

    Posted Dec 22, 2016 01:52 PM

    Hello Kar,

     

    Initially, I thought of keeping this under idea but thought of first part which is forcing to run the script as bg process could be an issue.

     

    I couldn't able to move this thread to idea, Could you please move it? and any idea usually how long it will take to update the script?

     

    Thank you,

    Raja Shravan



  • 4.  Re: wamui restart script with arguments
    Best Answer

    Broadcom Employee
    Posted Dec 23, 2016 03:26 AM

    Hi Raja,

     

    There's a way to let run the process started from the command line and leave the ssh window.

     

    If you have launched a program in your PuTtY SSH session on Linux or Unix

    box, and unfortunatly, you need to leave and you do not want to interrupt the execution

    of the program, you can use the disown command to make your program not get the SIGHUP

    when closing the session and keep it running in the background :

     

     

    1 - Hit "ctrl+z" to pause the program and get back to the shell;

    2 - Type "bg" to run it in the background;

    3 - Type "disown -h [job-spec]" where [job-spec] is the job number;

     

    To illustrate that :

     

    $ run.sh

    (hit ctrl+z)

    [1]+ Stopped run.sh

    $ bg

    [1]+ run.sh &

    $ disown -h %1

     

    then you can close or exit your session and the process will keep

    running on the machine in the background.

     

    Just wait the adminui is fully up and running before doing this.

     

    Hope that helps,

    Patrick



  • 5.  Re: wamui restart script with arguments

    Broadcom Employee
    Posted Jan 03, 2017 12:59 PM

    In the past, I've created a start-up script which calls run.sh. I use chkconfig to create symbolic links for each run level for init.d. The WAM UI should auto start on reboot. And you can use the new script to start the WAM UI without worrying about ending your session.

    This was done on an older version of SiteMinder with RHEL 5.5 I think. But the same principle should work.

    Details below.

     

    Pearse

     

    ========================================================

     

     

    Su to root. Go to /etc/rc.d/init.d and create a new file called smwamui.

     

    Add the following text to the file (note, you may need to change the numbers in the "chkconfig" section on line 2)

     

    #!/bin/sh

    # chkconfig: 345 99 15

    # Description: SiteMinder Administrative UI

    #

    start(){

            echo "Starting SiteMinder WAM UI (jboss).."

            runuser - smuser -c '/opt/CA/siteminder/adminui/bin/run.sh > /dev/null 2> /dev/null &'

    }

     

    stop(){

            echo "Stopping SiteMinder WAM UI (jboss).."

            runuser - smuser -c '/opt/CA/siteminder/adminui/bin/shutdown.sh > /dev/null 2> /dev/null & '

    }

     

     

    case "$1" in

      start)

            start

            ;;

      stop)

            stop

            ;;

      *)

            echo "Usage: smwamui {start|stop}"

            exit 1

    esac

     

    exit 0

     

    Make the file executable by all

     

          chmod 755 /etc/rc.d/init.d/smwamui

     

    Now run the following command to create the symbolic links for each run level

     

    chkconfig --add smwamui

     

    You can now shutdown the WAM UI if it is running

     

    Ensure that you are logged in as smuser before shutting down the WAM UI.

    Now run the following command

     

          /opt/CA/siteminder/adminui/bin/shutdown.sh

     

    Now su to root

    To start the WAM UI, and keep it running after logout, run the following command

     

          /etc/rc3.d/S99smwamui start

     

    To stop the WAM UI at any time, run the following command (while logged in as root)

     

          /etc/rc3.d/S99smwamui stop