#! /bin/sh # tweak (Bourne shell script) -- Get a Trac instance ready to be served by mod_wsgi WEB_SERVER_USER=www-data set -e trac-admin /srv/trac/kms permission add $LOGNAME TRAC_ADMIN # warning: this will restart Apache # Note: module is enabled automatically aptitude install libapache2-mod-wsgi cd "$1" # trac.ini ends up unreadable by other in some installations chown -R $WEB_SERVER_USER attachments db log plugins conf/trac.ini chmod g+rw conf/trac.ini patch -p0 << EOT --- conf/trac.ini.orig 2014-07-11 23:49:37.000000000 +0800 +++ conf/trac.ini 2014-07-12 01:25:38.000000000 +0800 @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- [attachment] -max_size = 262144 +max_size = 52428800 render_unsafe_content = false [browser] @@ -35,8 +35,7 @@ [logging] log_file = trac.log # log_format = -log_level = DEBUG -## log_type = none +log_level = INFO log_type = file [milestone] @@ -52,29 +51,29 @@ [notification] admit_domains = -always_notify_owner = false +always_notify_owner = true always_notify_reporter = false always_notify_updater = true ambiguous_char_width = single -email_sender = SmtpEmailSender +email_sender = SendmailEmailSender ignore_domains = mime_encoding = none -sendmail_path = sendmail +sendmail_path = /usr/lib/sendmail smtp_always_bcc = smtp_always_cc = smtp_default_domain = -smtp_enabled = false +smtp_enabled = true smtp_from = trac@example.com smtp_from_name smtp_password = smtp_port = 25 -smtp_replyto = trac@localhost +smtp_replyto = nobody@example.com smtp_server = localhost -smtp_subject_prefix = __default__ +smtp_subject_prefix = [ITS] smtp_user = ticket_subject_template = $prefix #$ticket.id: $summary -use_public_cc = false -use_short_addr = false +use_public_cc = true +use_short_addr = true use_tls = false [project] @@ -129,7 +128,7 @@ max_comment_size = 262144 max_description_size = 262144 preserve_newlines = default -restrict_owner = false +restrict_owner = true workflow = ConfigurableTicketWorkflow [ticket-workflow] EOT