lockfile -l 3600 "${LOCK_DAILY}"
trap onerror ERR
-trap cleanup EXIT TERM HUP INT QUIT
+trap remove_daily_lock EXIT TERM HUP INT QUIT
touch "${LOCK_BRITNEY}"
lockfile "$LOCK_ACCEPTED"
lockfile "$LOCK_NEW"
+trap remove_all_locks EXIT TERM HUP INT QUIT
GO=(
FUNC="punew"
)
stage $GO
-#GO=(
-# FUNC="opunew"
-# TIME="o-p-u-new"
-# ARGS="oldproposedupdates"
-# ERR="false"
-#)
-#stage $GO
+GO=(
+ FUNC="opunew"
+ TIME="o-p-u-new"
+ ARGS="oldproposedupdates"
+ ERR="false"
+)
+stage $GO
GO=(
FUNC="newstage"
)
stage $GO
-rm -f "$LOCK_ACCEPTED"
-rm -f "$LOCK_NEW"
-rm -f "${LOCK_DAILY}"
+remove_all_locks
+trap - EXIT TERM HUP INT QUIT
ts "locked part finished"
state "postlock"
)
stage $GO &
-GO=(
- FUNC="reports"
- TIME="reports"
- ARGS=""
- ERR=""
-)
-stage $GO &
-
GO=(
FUNC="dm"
TIME=""
)
stage $GO
+# we need to wait for the background processes before the end of dinstall
+wait
+
log "Daily cron scripts successful, all done"
exec > "$logdir/afterdinstall.log" 2>&1