Revert "remove docker binaries from git, add remove.sh"
This reverts commit e9e9b2976e.
This commit is contained in:
parent
e9e9b2976e
commit
d7a1d790be
3 changed files with 0 additions and 27 deletions
27
remove.sh
27
remove.sh
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# remove.sh — uninstall a Wallarm node
|
|
||||||
set -e
|
|
||||||
NAME="${1:-}"
|
|
||||||
if [ -z "$NAME" ]; then
|
|
||||||
echo "Usage: $0 <node-name>"
|
|
||||||
echo " $0 --all"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$NAME" = "--all" ]; then
|
|
||||||
docker ps --filter 'name=wallarm-' -q | xargs -r docker rm -f
|
|
||||||
rm -rf /opt/fw/app/state.json
|
|
||||||
echo "All nodes removed."
|
|
||||||
else
|
|
||||||
docker rm -f "wallarm-${NAME}" 2>/dev/null
|
|
||||||
# Clean state
|
|
||||||
python3 -c "
|
|
||||||
import json
|
|
||||||
try:
|
|
||||||
with open('/opt/fw/app/state.json') as f: s = json.load(f)
|
|
||||||
s['nodes'] = [n for n in s.get('nodes',[]) if n['name'] != '${NAME}']
|
|
||||||
with open('/opt/fw/app/state.json','w') as f: json.dump(s, f, indent=2)
|
|
||||||
except: pass
|
|
||||||
" 2>/dev/null
|
|
||||||
echo "Node ${NAME} removed."
|
|
||||||
fi
|
|
||||||
BIN
sources/binaries/docker-29.2.1.tgz
Normal file
BIN
sources/binaries/docker-29.2.1.tgz
Normal file
Binary file not shown.
BIN
sources/images/wallarm-node-6.11.0-rc1.tar.gz
Normal file
BIN
sources/images/wallarm-node-6.11.0-rc1.tar.gz
Normal file
Binary file not shown.
Loading…
Reference in a new issue