Attachment 'mailman-post-update.txt'
Download 1 #!/bin/bash
2
3 set -e
4
5 BINDIR="/opt/mailman/mm/bin"
6 CONFDIR="/opt/mailman/mm"
7 SETTINGS="settings"
8 DJANGO_CONTROL_SCRIPT="$BINDIR/django-admin"
9 STATIC_DIR="$CONFDIR/static"
10 DEBUG="False"
11
12 set -x
13
14 if [ "$DEBUG" == "False" ]; then
15 mkdir -p "$STATIC_DIR" || :
16 "$DJANGO_CONTROL_SCRIPT" collectstatic --clear --noinput --verbosity 0
17 "$DJANGO_CONTROL_SCRIPT" compress
18 "$DJANGO_CONTROL_SCRIPT" compilemessages
19 fi
20
21 syncdb_cmd="$DJANGO_CONTROL_SCRIPT migrate"
22 if [[ ! -t 1 ]]; then
23 # stdout is not a terminal
24 syncdb_cmd="$syncdb_cmd --noinput"
25 fi
26 $syncdb_cmd
27 echo 'Do you want to rebuild the search index? This takes a long time.'
28 echo 'Type "Yes" to continue; anything else to quit.'
29 read -p "> " response
30 if [ "x$response" != "xYes" ] ; then exit; fi
31 "$DJANGO_CONTROL_SCRIPT" update_index
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.