Appdynamics / Appdynamics/SE-LAB-SAP

Use a SystemD File for appdhttpsdk

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Hey @michaelenglert. It would be great to include a systemd file in apphttpsdk:

```
[Unit]
Description=Appdynamics SAP Gateway Service
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/opt/appdynamics/appdhttpsdk/runSDKManager

[Install]
WantedBy=default.target
```

So in the Dockerfile you could move it to

> /etc/system/systemd/appdhttpsdk.service.

Then Do

> systemctl daemon-reload && systemctl enable appdhttpsdk

It then sould start the service on container start after the network is up.
One can then also stop it as it kills the main PID and all Processes underneath cleanly.

```
● appdhttpsdk.service - Appdynamics SAP Gateway Service
Loaded: loaded (/etc/systemd/system/appdhttpsdk.service; enabled; vendor preset: disabled)
Active: active (running) since Mo 2018-09-17 10:55:32 CEST; 51min ago
Main PID: 8909 (java)
CGroup: /system.slice/appdhttpsdk.service
├─8909 /bin/java -jar /opt/appdynamics/appdhttpsdk/SDKManager.jar 7999
├─8925 ./AppdHttpSDK ./conf/myconf1.conf
└─8927 ./AppdHttpSDK ./conf/myconf2.conf
```

Regards
Florian Braun @WuerthIT

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.