RHEL7 and systemd start files for WebView
search cancel

RHEL7 and systemd start files for WebView

book

Article ID: 225691

calendar_today

Updated On:

Products

CA Application Performance Management (APM / Wily / Introscope)

Issue/Introduction

Installing CA Application Performance Management Enterprise Manager (APM/Wily/Introscope) on Redhat Enterprise 7.x and would like to use systemd startup scripts to control the start/stop status for the WebView console. Is this supported and are there examples for using this?

Environment

All RedHat/CentOS running systemd and Webview.

Resolution

To start the WebView automatically on reboot, create the below file under: /etc/systemd/system/wvctrl.service

# File location:
# /etc/systemd/system/wvctrl.service
[Unit]
Description=Start Introscope Web View
After=syslog.target network.target emctrl.target
ConditionFileIsExecutable=/opt/CA/Introscope/bin/WVCtrl.sh

[Service]
Type=forking

Environment=JAVA_HOME="/opt/CA/Introscope/jre/bin"

ExecStart=/opt/CA/Introscope/bin/WVCtrl.sh start
ExecStop=/opt/CA/Introscope/bin/WVCtrl.sh stop

[Install]
WantedBy=multi-user.target 

Once the file is created, test the WebView service that can be started with:

~# systemctl start wvctrl

If it works, enable it for system-startup using:

~# systemctl start wvctrl

You can stop the webview with:

~# systemctl start wvctrl

and remove it from autostart with:

~# systemctl disable wvctrl