File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,24 @@ update_services() {
24
24
}
25
25
26
26
main () {
27
- local blacklist supports_detach_option=false
27
+ local blacklist sleep_time supports_detach_option
28
28
blacklist=" ${BLACKLIST_SERVICES:- } "
29
+ sleep_time=" ${SLEEP_TIME:- 5m} "
29
30
31
+ supports_detach_option=false
30
32
if [[ " $( server_version) " > " 17.05" ]]; then
31
33
supports_detach_option=true
32
34
echo " Enabling synchronous service updates"
35
+ else
36
+ supports_detach_option=false
33
37
fi
34
38
35
39
[[ " $blacklist " != " " ]] && echo " Excluding services: $blacklist "
36
40
37
41
while true ; do
38
42
update_services " $blacklist " " $supports_detach_option "
39
- echo " Sleeping $SLEEP_TIME before next update"
40
- sleep " $SLEEP_TIME "
43
+ echo " Sleeping $sleep_time before next update"
44
+ sleep " $sleep_time "
41
45
done
42
46
}
43
47
You can’t perform that action at this time.
0 commit comments