Auto Start Up And Stop Script for WAM UI

Document ID : KB000074545
Last Modified Date : 12/04/2018
Show Technical Document Details
Question:
We have installed CA SSO WAM UI 12.7 on RHEL 7, but have not been able to implement auto start  for the admin ui using systemd (systemctl).  Can this be done?
Environment:
Admin UI 12.6 and 12.7 on RedHat Linux 7
Answer:
Please note that these steps use "root" as the user.  If you are using a non-root user, you may run into issues related to permissions which your system admin may be able to resolve.

Follow these steps:
1.Create a service by creating a new file /etc/systemd/system/NAME.service. Replace 'NAME' with any name that best represents the process you are trying to autostart.
e.g. adminui.service

2.Add the following content in the file /etc/systemd/system/NAME.service and replace adminui_root with an explicit path to the CA Single Sign-on Admin UI installation directory.

[Unit]
Description=adminui Service
Requires=network.target
[Service]
Type=simple
User=root
Group=root
ExecStart=/bin/ksh /adminui_root/bin/standalone.sh
ExecStop=/bin/ksh /adminui_root/bin/jboss-cli.sh -c --command=:shutdown
Restart=on-failure
WorkingDirectory=/adminui_root/bin
[Install]
WantedBy=multi-user.target

Example:
[Unit]
Description=adminui Service
Requires=network.target

[Service]
Type=simple
User=root
Group=root

ExecStart=/bin/ksh /opt/ca/siteminder/adminui/bin/standalone.sh
ExecStop=/bin/ksh /opt/ca/siteminder/adminui/bin/jboss-cli.sh -c --command=:shutdown
Restart=on-failure
WorkingDirectory=/opt/ca/siteminder/adminui/bin

[Install]
WantedBy=multi-user.target

If you are using a non-root user, be sure that the user has proper permissions to execute and run the admin ui service and systemd.  You will need to replace the User and Group from the example above to match the desired user.  For example,
[Unit]
Description=adminui Service
Requires=network.target

[Service]
Type=simple
User=smuser
Group=smuser

ExecStart=/bin/ksh /opt/ca/siteminder/adminui/bin/standalone.sh
ExecStop=/bin/ksh /opt/ca/siteminder/adminui/bin/jboss-cli.sh -c --command=:shutdown
Restart=on-failure
WorkingDirectory=/opt/ca/siteminder/adminui/bin

[Install]
WantedBy=multi-user.target

3.Run the following commands to start the Policy Server as a service/daemon process. NOTE: Replace NAME with the name provided in step 1.
systemctl daemon-reload
systemctl enable NAME
systemctl start NAME

e.g.
systemctl daemon-reload
systemctl enable adminui
systemctl start adminui

3a. To disable the service at boot, run the following command:
systemctl disable NAME