% pleaserun --json /usr/bin/mgmt | jq -r '.files[] | select(.path | match("service$")) | .content'
No platform selected. Autodetecting... {:platform=>"systemd", :version=>"(245.4-4ubuntu3.11)", :level=>:warn}
No name given, setting reasonable default based on the executable {:name=>"mgmt", :level=>:warn}
Created
November 9, 2021 04:37
-
-
Save jordansissel/81c208f945812f004020e70f0818e8e2 to your computer and use it in GitHub Desktop.
pleaserun systemd service extraction with jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=no description given | |
[Service] | |
Type=simple | |
User=root | |
Group=root | |
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist. | |
# Prefixing the path with '-' makes it try to load, but if the file doesn't | |
# exist, it continues onward. | |
EnvironmentFile=-/etc/default/mgmt | |
EnvironmentFile=-/etc/sysconfig/mgmt | |
ExecStart=/usr/bin/mgmt | |
Restart=always | |
WorkingDirectory=/ | |
# When stopping, how long to wait before giving up and sending SIGKILL? | |
# Keep in mind that SIGKILL on a process can cause data loss. | |
TimeoutStopSec=infinity | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment