You've already forked baupm-core
44 lines
1.3 KiB
Bash
44 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
# Email-address of the system
|
|
mail_address="${REDMINE_IMAP_ADDRESS}"
|
|
|
|
# Email-Account username and password
|
|
mail_username="$mail_address"
|
|
mail_password="${REDMINE_IMAP_PASSWORD}"
|
|
|
|
# IMAP-Server address and port
|
|
mail_host="${REDMINE_IMAP_HOST}"
|
|
mail_port=${REDMINE_IMAP_PORT:-993}
|
|
mail_ssl=${REDMINE_IMAP_SSL:-true}
|
|
|
|
# IMAP-INBOX-Folder
|
|
mail_folder="INBOX"
|
|
|
|
# Default project and tracker
|
|
project="${REDMINE_IMAP_DEFAULT_PROJECT:-"meta"}"
|
|
tracker="${REDMINE_IMAP_DEFAULT_TRACKER:-"Support"}"
|
|
|
|
# Redmine Settings
|
|
unknown_user_action="ignore"
|
|
allow_override="all"
|
|
no_permission_check=true
|
|
app_root="/opt/bitnami/redmine"
|
|
|
|
if [[ -n "$mail_address" ]] && [[ -n "$mail_username" ]] && [[ -n "$mail_password" ]] && [[ -n "$mail_host" ]]; then
|
|
sudo /opt/bitnami/ruby/bin/rake -f $app_root/Rakefile --silent redmine:email:receive_imap RAILS_ENV="production" \
|
|
host="$mail_host" \
|
|
port=$mail_port \
|
|
username="$mail_username" \
|
|
password="$mail_password" \
|
|
ssl=$mail_ssl \
|
|
move_on_success="$mail_folder.success" \
|
|
move_on_failure="$mail_folder.failed" \
|
|
unknown_user="$unknown_user_action" \
|
|
tracker="$tracker" \
|
|
allow_override="$allow_override" \
|
|
folder="$mail_folder" \
|
|
project="$project" \
|
|
no_permission_check=$no_permission_check
|
|
fi
|