Created
September 16, 2018 13:41
-
-
Save danitfk/fd9cfc398b5a2e0985044180ab9de43d to your computer and use it in GitHub Desktop.
A Simple bash script to check Jira process based on "jps" tool.
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
#!/bin/bash | |
# Specify Atlassian Jira username (tomcat) | |
JIRAUSER="jira" | |
if [[ "$(sudo su $JIRAUSER -c 'jps -v'| grep "jira" | awk {'print $1'})" -gt "0" ]] | |
then | |
echo "1" | |
else | |
echo "0" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment