Skip to content

Commit 00b6cc0

Browse files
committed
Exit container_cleanup.sh early if there's nothing to do; also don't autorestart it
1 parent b813f28 commit 00b6cc0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

00-cleanup.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ priority=-1
44
stdout_logfile=/dev/stdout
55
stdout_logfile_maxbytes=0
66
redirect_stderr=true
7+
autorestart=false
8+
startsecs=0

container_cleanup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
if [[ -z $(shopt -s nullglob && echo /etc/osg/image-cleanup.d/*.sh) ]]; then
4+
exit 0
5+
fi
6+
37
# Allow child images to add cleanup customizations
48
source_cleanup () {
59
for x in /etc/osg/image-cleanup.d/*.sh; do source "$x"; done

0 commit comments

Comments
 (0)