#!/bin/bash set -u set -e source '%%redmine_path%%/plugins/redmine_installer/installer/environment.sh' function title() { infom ">>>> $1 <<<<" } function redmine_install() { title 'Installing Redmine...' "$INSTALL_ROOT/run.sh" '%%installer_target_task%%' } function apache_start() { title 'Restarting Apache HTTPD service...' sudo service apache2 restart } function ssh_start() { title 'Restarting SSH service...' sudo service ssh restart } function postgresql_start() { if bool_r "$SKIP_DATABASE"; then return 0; fi if ! bool_r "$postgresql_internal"; then return 0; fi title 'Restarting PostgresSQL service...' sudo service postgresql restart } function request_http_interface() { title 'Requesting web interface...' wget 'http://localhost%%web.path%%' &> /dev/null } function redmine_log() { title 'Reading production log...' LOG_FILE='%%redmine_path%%/log/production.log' printf " * tail -f \"$LOG_FILE\":\n" sudo tail -f "$LOG_FILE" } redmine_install apache_start ssh_start postgresql_start request_http_interface redmine_log