Last active
February 20, 2020 10:13
-
-
Save palm002/aedbc422e5504b385f4e6b5c54411edd to your computer and use it in GitHub Desktop.
getting PID from a service enabled by user
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
#!/usr/bin/env bash | |
# capture the PID of service | |
ps aux | grep $SERVICE | grep jenkins | grep -v grep | awk '{print $2}' > /path/to/logs/log.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment