rm -f ${LOCK_ACCEPTED}
}
+# If we error out this one is called, *FOLLOWED* by cleanup above
+function onerror() {
+ ERRDATE=$(date "+%Y.%m.%d-%H:%M:%S")
+ cat "$LOGFILE" | mail -s "ATTENTION ATTENTION! dinstall error at ${ERRDATE} (Be quiet, Brain, or I'll stab you with a Q-tip)" cron@ftp-master.debian.org
+}
+
########################################################################
# the actual dinstall functions follow #
########################################################################
function dakcleanup() {
log "Cleanup old packages/files"
- dak clean-suites
+ dak clean-suites -m 10000
dak clean-queues
}
}
function merkel2() {
- # Push katie@merkel so it syncs the projectb there. Returns immediately, the sync runs detached
+ # Push dak@merkel so it syncs the projectb there. Returns immediately, the sync runs detached
log "Trigger merkels projectb sync"
- ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_projectb katie@merkel.debian.org sleep 1
+ ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_projectb dak@merkel.debian.org sleep 1
}
function runparts() {
# it has to cd first!
cd ${configdir}
- if [ -f "${LOCK_STOP}" ]; then
- log "${LOCK_STOP} exists, exiting immediately"
- exit 42
- fi
+ if [ -f "${LOCK_STOP}" ]; then
+ log "${LOCK_STOP} exists, exiting immediately"
+ exit 42
+ fi
if [ "${ERR}" = "false" ]; then
set +e
ts "${TIME}"
fi
- if [ -f "${LOCK_STOP}" ]; then
- log "${LOCK_STOP} exists, exiting immediately"
- exit 42
- fi
+ if [ -f "${LOCK_STOP}" ]; then
+ log "${LOCK_STOP} exists, exiting immediately"
+ exit 42
+ fi
}
########################################################################
LOCK_STOP="$lockdir/archive.stop"
lockfile -l 3600 "${LOCK_DAILY}"
-trap cleanup EXIT ERR TERM HUP INT QUIT
+trap onerror ERR
+trap cleanup EXIT TERM HUP INT QUIT
touch "${LOCK_BRITNEY}"
)
stage $GO
-GO=(
- FUNC="pgdakdev"
- TIME="dak-dev db"
- ARGS=""
- ERR="false"
-)
-stage $GO
-
GO=(
FUNC="expire"
TIME="expire_dumps"
)
stage $GO
-ulimit -m 90000 -d 90000 -s 10000 -v 200000
-
GO=(
FUNC="runparts"
TIME="run-parts"
ARGS=""
ERR="false"
)
+stage $GO
rm -f ${LOCK_BRITNEY}
+GO=(
+ FUNC="pgdakdev"
+ TIME="dak-dev db"
+ ARGS=""
+ ERR="false"
+)
+stage $GO
+
GO=(
FUNC="aptftpcleanup"
TIME="apt-ftparchive cleanup"
exec > "$logdir/afterdinstall.log" 2>&1
-cat "$LOGFILE" | mail -s "Log for dinstall run of ${NOW}" cron@ftp-master.debian.org
-
GO=(
FUNC="renamelogfile"
TIME=""