File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
source/compose.manager/scripts Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
33export HOME=/root
4- export DOCKER_JSON=/usr/local/emhttp/state/plugins/dynamix.docker.manager/docker.json
4+ DOCKER_MANAGER=/usr/local/emhttp/state/plugins/dynamix.docker.manager
5+ DOCKER_JSON=$DOCKER_MANAGER /docker.json
6+ DOCKER_IMAGES=$DOCKER_MANAGER /images
7+ UNRAID_IMAGES=/var/lib/docker/unraid/images
58
69case $1 in
710
811 up)
912 docker compose -f " $2 " -p " $3 " ps -a |
1013 awk ' {if (NR!=1) {printf("%s.\"%s\"", sep, $1); sep=", "}}' |
1114 xargs -0 -I {} jq ' del({})' $DOCKER_JSON > $DOCKER_JSON
15+ docker compose -f " $2 " -p " $3 " ps -a |
16+ xargs -I {} find $DOCKER_IMAGES $UNRAID_IMAGES -name {}.png -delete
1217 docker compose -f " $2 " -p " $3 " up -d 2>&1
1318 ;;
1419
1520 down)
1621 docker compose -f " $2 " -p " $3 " ps -a |
1722 awk ' {if (NR!=1) {printf("%s.\"%s\"", sep, $1); sep=", "}}' |
1823 xargs -0 -I {} jq ' del({})' $DOCKER_JSON > $DOCKER_JSON
24+ docker compose -f " $2 " -p " $3 " ps -a |
25+ xargs -I {} find $DOCKER_IMAGES $UNRAID_IMAGES -name {}.png -delete
1926 docker compose -f " $2 " -p " $3 " down 2>&1
2027 ;;
2128
You can’t perform that action at this time.
0 commit comments