Auto refresh blocky lists when template change
This commit is contained in:
parent
9ee660cb6d
commit
c478ba4278
@ -88,6 +88,16 @@ job "blocky" {
|
||||
ports = ["dns", "api"]
|
||||
}
|
||||
|
||||
action "refresh-lists" {
|
||||
command = "/app/blocky"
|
||||
args = ["lists", "refresh"]
|
||||
}
|
||||
|
||||
action "healthcheck" {
|
||||
command = "/app/blocky"
|
||||
args = ["healthcheck"]
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 50
|
||||
memory = 75
|
||||
@ -131,11 +141,17 @@ job "blocky" {
|
||||
{{- end }}
|
||||
EOF
|
||||
destination = "$${NOMAD_TASK_DIR}/block"
|
||||
change_mode = "noop"
|
||||
change_mode = "script"
|
||||
|
||||
change_script {
|
||||
command = "/app/blocky"
|
||||
args = ["lists", "refresh"]
|
||||
timeout = "20s"
|
||||
}
|
||||
|
||||
wait {
|
||||
min = "10s"
|
||||
max = "20s"
|
||||
min = "30s"
|
||||
max = "1m"
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,11 +164,17 @@ job "blocky" {
|
||||
{{- end }}
|
||||
EOF
|
||||
destination = "$${NOMAD_TASK_DIR}/allow"
|
||||
change_mode = "noop"
|
||||
change_mode = "script"
|
||||
|
||||
change_script {
|
||||
command = "/app/blocky"
|
||||
args = ["lists", "refresh"]
|
||||
timeout = "20s"
|
||||
}
|
||||
|
||||
wait {
|
||||
min = "10s"
|
||||
max = "20s"
|
||||
min = "30s"
|
||||
max = "1m"
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +187,13 @@ job "blocky" {
|
||||
{{- end }}
|
||||
EOF
|
||||
destination = "$${NOMAD_TASK_DIR}/smarttv-regex.txt"
|
||||
change_mode = "noop"
|
||||
change_mode = "script"
|
||||
|
||||
change_script {
|
||||
command = "/app/blocky"
|
||||
args = ["lists", "refresh"]
|
||||
timeout = "20s"
|
||||
}
|
||||
|
||||
wait {
|
||||
min = "10s"
|
||||
|
Loading…
Reference in New Issue
Block a user