HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vmi1674223.contaboserver.net 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: root (0)
PHP: 7.4.3-4ubuntu2.22
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //opt/openproject/packaging/scripts/check
#!/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 setting:get[protocol] &>/dev/null; then
  log_ok "MySQL configuration is working"
else
  log_ko "MySQL 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 -q "unicorn worker" ; then
  log_ok "openproject server is running"
else
  log_ko "openproject server is NOT running"
fi

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

if [ -z "$ADMIN_EMAIL" ]; then
  log_ko "no ADMIN_EMAIL set. Can't test email settings."
else
  if $(pwd)/packaging/scripts/send-test-email ; then
    log_ok "test email sent to ${ADMIN_EMAIL}"
  else
    log_ko "unable to send test email to ${ADMIN_EMAIL}"
  fi
fi