Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Add tasks include key word
· d5c072da
Bastian Blank
authored
Apr 15, 2018
d5c072da
Use include key instead of runcronscript
· 4b8a1862
Bastian Blank
authored
Apr 15, 2018
4b8a1862
Show whitespace changes
Inline
Side-by-side
config/debian-security/weekly.tasks
View file @
4b8a1862
...
...
@@ -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
config/debian/common
View file @
4b8a1862
...
...
@@ -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
}
...
...
config/debian/cronscript
View file @
4b8a1862
...
...
@@ -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
}
...
...