Revert "remove docker binaries from git, add remove.sh"

This reverts commit e9e9b2976e.
This commit is contained in:
admin 2026-08-03 15:11:13 +00:00
parent e9e9b2976e
commit d7a1d790be
3 changed files with 0 additions and 27 deletions

View file

@ -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

Binary file not shown.

Binary file not shown.