Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

802 B
Raw Blame
#!/bin/bash

set -e

log_ok() {
  echo -e "\e[32m[ok]\e[0m $1"
}

log_ko() {
  echo -e "\e[31m[ko]\e[0m $1"
}

# try to get a setting to make sure database connection works
if rake openproject:db:check_connection 2>/dev/null; then
  log_ok "PostgreSQL configuration is working"
else
  log_ko "PostgreSQL connection is NOT working"
fi

if ps -u "$SERVER_USER" &>/dev/null ; then
  log_ok "Web server is running"
else
  log_ko "Web server is NOT running"
fi

if ps -u "$APP_USER" -f | grep -qP "puma: cluster worker \d" ; then
  log_ok "openproject server is running"
else
  log_ko "openproject server is NOT running"
fi

if ps -u "$APP_USER" -f | grep -q "good_job start" ; then
  log_ok "openproject background job worker is running"
else
  log_ko "openproject background job worker is NOT running"
fi