Skip to content

Commit 2e49d5a

Browse files
authored
Fixed healthcheck file deletion
1 parent 3b23f99 commit 2e49d5a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docker-healthcheck.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515

1616
remoteMount = '/remote{}'.format(i)
1717

18+
checkFile = remoteMount + "/healthcheck.txt"
1819
try:
19-
file = open(remoteMount + "/healthcheck.txt", "w")
20+
file = open(checkFile, "w")
2021
file.write("healthcheck")
2122
file.close()
23+
os.remove(checkFile)
2224
except OSError:
2325
fail = True
2426
print(remoteMount + " is not writeable")
@@ -32,4 +34,4 @@
3234
exit(1)
3335

3436
print("Container is healthy")
35-
exit(0)
37+
exit(0)

0 commit comments

Comments
 (0)