You've already forked baupm-core
Initial commit
This commit is contained in:
7
scripts/crontab
Normal file
7
scripts/crontab
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
# Fetch emails
|
||||
*/5 * * * * /home/bitnami/apps/redmine/fetch-mails >/dev/null 2>&1
|
||||
|
||||
# Update Letsencrypt Certificate
|
||||
#### Don't forget to set the --email and --domain arguments! ####
|
||||
# 0 0 * * * sudo /opt/bitnami/letsencrypt/lego --path /opt/bitnami/letsencrypt --email="" --http --http-timeout 30 --http.webroot /opt/bitnami/apps/letsencrypt --domains="" renew && sudo /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf -k graceful
|
||||
43
scripts/fetch-mails.sh
Normal file
43
scripts/fetch-mails.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Email-address of the system
|
||||
mail_address=""
|
||||
|
||||
# Email-Account username and password
|
||||
mail_username="$mail_address"
|
||||
mail_password=""
|
||||
|
||||
# IMAP-Server address and port
|
||||
mail_host=""
|
||||
mail_port=993
|
||||
mail_ssl=true
|
||||
|
||||
# IMAP-INBOX-Folder
|
||||
mail_folder="INBOX"
|
||||
|
||||
# Default project and tracker
|
||||
project="meta"
|
||||
tracker="Support"
|
||||
|
||||
# Redmine Settings
|
||||
unknown_user_action="ignore"
|
||||
allow_override="all"
|
||||
no_permission_check=true
|
||||
app_root="/home/bitnami/apps/redmine/htdocs"
|
||||
|
||||
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
|
||||
22
scripts/git-post-receive.sh
Normal file
22
scripts/git-post-receive.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
TARGET="/home/bitnami/apps/redmine/htdocs/public/themes/Ossig"
|
||||
GIT_DIR="/repo/ossig-theme.git"
|
||||
BRANCH="master"
|
||||
RESTART_APACHE=""
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
# shellcheck disable=SC2162
|
||||
while read oldrev newrev ref; do
|
||||
if [ "$ref" = "refs/heads/$BRANCH" ]; then
|
||||
echo "Ref $ref received. Deploying ${BRANCH} branch to production..."
|
||||
git --work-tree=$TARGET --git-dir=$GIT_DIR checkout -f $BRANCH
|
||||
|
||||
if [[ -n $RESTART_APACHE ]]; then
|
||||
echo "Restarting Apache Webserver"
|
||||
sudo "$HOME/stack/ctlscript.sh" restart apache >>/dev/null 2>&1
|
||||
fi
|
||||
else
|
||||
echo "Ref $ref received. Doing nothing: only the ${BRANCH} branch may be deployed on this server."
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user