Skip to content
Commits on Source (2)
......@@ -2,5 +2,5 @@
LOCK DEPLOY 600 shared false
LOCK UNCHECKED 1200 exclusive false
update_releases none none true false
runcronscript mirror none true true
INCLUDE mirror none true true
linkmorgue none none false true
......@@ -380,14 +380,6 @@ function mklslar() {
done
}
# Run another cronscript from within cronscript, sick bastard
function runcronscript() {
local script=${1:-}
if [[ -n ${script} ]]; then
$configdir/cronscript ${script}
fi
}
function linkmorgue() {
${scriptsdir}/link_morgue.sh
}
......
......@@ -85,6 +85,13 @@ EOF
;;
esac
function includetasks() {
local NAME=${1:?}
_preparetasks ${NAME}
_runtasks ${NAME}
}
function _preparetasks() {
local NAME=${1:?}
......@@ -127,6 +134,7 @@ function _runtasks() {
# Note: Only really makes sense at beginning of a tasks file,
# the stages directory gets cleared at successful exit anyways.
# RMSTAGE simply ensures that ALL of the crons tasks ALWAYS run.
# INCLUDE - Runs another task list after including corresponding functions
# Note 2: If you want to hand an empty value to the stage function,
# use the word "none" in the list below.
......@@ -174,6 +182,9 @@ function _runtasks() {
UNLOCK)
unlock ${ARGS}
;;
INCLUDE)
includetasks ${ARGS}
;;
*)
GO=(
FUNC=${FUNC}
......