mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
stop using exit codes, track app state
This commit is contained in:
committed by
Keagan McClelland
parent
30f8b8e6cd
commit
5a121945d2
@@ -1,18 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
for CONTAINER in $(docker ps -aq); do
|
||||
EXIT=`docker inspect -f "{{ .State.ExitCode }}" $CONTAINER`
|
||||
if [ $EXIT -eq 0 ]; then
|
||||
continue
|
||||
fi
|
||||
if [ $EXIT -eq 143 ]; then
|
||||
continue
|
||||
fi
|
||||
if [ $EXIT -eq 137 ]; then
|
||||
OOM=`docker inspect -f "{{ .State.OOMKilled }}" $CONTAINER`
|
||||
if [ "$OOM" == "false" ]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
docker start $CONTAINER
|
||||
done
|
||||
exec appmgr repair-app-status
|
||||
Reference in New Issue
Block a user