datatracker/bin/hourly
Henrik Levkowetz ea4160a709 Applied production patches to trunk.
- Legacy-Id: 11208
2016-05-19 20:03:19 +00:00

70 lines
2.2 KiB
Bash
Executable file

#!/bin/bash
# Hourly datatracker jobs
#
# This script is expected to be triggered by cron from
# $DTDIR/etc/cron.d/datatracker which should be symlinked from
# /etc/cron.d/
DTDIR=/a/www/ietf-datatracker/web
cd $DTDIR/
# Set up the virtual environment
source $DTDIR/bin/activate
logger -p user.info -t cron "Running $DTDIR/bin/hourly"
# *** Enable when removed from /a/www/ietf-datatracker/scripts/Cron-runner: ***
# # Update community lists. Remove once the community rewrite (will be around 6.20.0 )
# $DTDIR/ietf/manage.py update_community_lists
#
# # Polling backup for iana and rfc-editory post APIs
# $DTDIR/ietf/bin/iana-changes-updates
# $DTDIR/ietf/bin/iana-protocols-updates
# $DTDIR/ietf/bin/rfc-editor-index-updates
# $DTDIR/ietf/bin/rfc-editor-queue-updates
#
# # Generate alias and virtual files for draft email aliases
# $DTDIR/ietf/bin/generate-draft-aliases && \
# ( cd /a/postfix; /usr/sbin/postalias -o draft-aliases; ) && \
# ( cd /a/postfix; /usr/sbin/postmap -o draft-virtual; )
#
# # Generate alias and virtual files for group email aliases
# $DTDIR/ietf/bin/generate-wg-aliases && \
# ( cd /a/postfix; /usr/sbin/postalias -o group-aliases; ) && \
# ( cd /a/postfix; /usr/sbin/postmap -o group-virtual; )
#
# # Generate some static files
# ID=/a/www/ietf-ftp/internet-drafts/
# DOWNLOAD=/a/www/www6s/download/
#
# export TMPDIR=/a/tmp
#
# TMPFILE1=`mktemp` || exit 1
# TMPFILE2=`mktemp` || exit 1
# TMPFILE3=`mktemp` || exit 1
# TMPFILE4=`mktemp` || exit 1
# TMPFILE5=`mktemp` || exit 1
# TMPFILE6=`mktemp` || exit 1
# TMPFILE7=`mktemp` || exit 1
# chmod a+r $TMPFILE1 $TMPFILE2 $TMPFILE3 $TMPFILE4 $TMPFILE5 $TMPFILE6 $TMPFILE7
#
# python -m ietf.idindex.generate_all_id_txt >> $TMPFILE1
# python -m ietf.idindex.generate_id_index_txt >> $TMPFILE2
# python -m ietf.idindex.generate_id_abstracts_txt >> $TMPFILE3
# cp $TMPFILE1 $TMPFILE4
# cp $TMPFILE2 $TMPFILE5
# cp $TMPFILE3 $TMPFILE6
# python -m ietf.idindex.generate_all_id2_txt >> $TMPFILE7
#
# mv $TMPFILE1 $ID/all_id.txt
# mv $TMPFILE2 $ID/1id-index.txt
# mv $TMPFILE3 $ID/1id-abstracts.txt
# mv $TMPFILE4 $DOWNLOAD/id-all.txt
# mv $TMPFILE5 $DOWNLOAD/id-index.txt
# mv $TMPFILE6 $DOWNLOAD/id-abstract.txt
# mv $TMPFILE7 $ID/all_id2.txt
#
# exit 0