Skip to content

Instantly share code, notes, and snippets.

@danitfk
Created September 16, 2018 13:41
Show Gist options
  • Save danitfk/fd9cfc398b5a2e0985044180ab9de43d to your computer and use it in GitHub Desktop.
Save danitfk/fd9cfc398b5a2e0985044180ab9de43d to your computer and use it in GitHub Desktop.
A Simple bash script to check Jira process based on "jps" tool.
#!/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