Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RedHat 6 Service Manifest problem #243

Closed
rigareau opened this issue Apr 19, 2018 · 0 comments · Fixed by #258
Closed

RedHat 6 Service Manifest problem #243

rigareau opened this issue Apr 19, 2018 · 0 comments · Fixed by #258

Comments

@rigareau
Copy link
Contributor

rigareau commented Apr 19, 2018

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 2017.3.4
  • Ruby: Any
  • Distribution: RedHat 6.9
  • Module version:3.3.0 - 3.4.1

How to reproduce (e.g Puppet code you use)

Install eazybi and configure tu run an external process to execute the reports.

Or for development and testing purposes you can just look at a log file while being logged in with the userid that is executing jira.
sudo -iu jira
tail -f /home/jira/logs/atlassian-jira.log

Either of theses actions will create a process that is matched by the pgrep expression that is used to detect if the service is running and will throw an error because there is more than 1 process id matching.

What are you seeing

When I ask the Jira service for a status it produce the following error.
$>service jira status
/etc/init.d/jira: line 66: [: too many arguments
jira is stopped

What behaviour did you expect instead

service jira status
jira is running

Output log

$>service jira status
/etc/init.d/jira: line 66: [: too many arguments
jira is stopped

Any additional information you'd like to impart

Replace service status test to use the catalina.pid content just as in the redhat 7 service unit file.

function status() {

STATUS=$( pgrep -F <%= scope.lookupvar('jira::webappdir') %>/work/catalina.pid ) || STATUS=0
if [ $STATUS -ne 0 ];then
echo "$SERVICE is running"
return 0
else
echo "$SERVICE is stopped"
return 1
fi

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant