Page MenuHomeWMGMC Issues

docker-entrypoint.sh
No OneTemporary

docker-entrypoint.sh

#!/bin/sh
backend=iptables
nft list table ip filter &>/dev/null
nftables_found=$?
iptables -L -n &>/dev/null
iptables_found=$?
if [ $nftables_found -lt $iptables_found ]; then
backend=nftables
fi
if [ $nftables_found -gt $iptables_found ]; then
backend=iptables
fi
if [ $nftables_found -eq 0 ] && [ $nftables_found -eq $iptables_found ]; then
nftables_lines=$(nft list ruleset | wc -l)
iptables_lines=$(iptables-save | wc -l)
if [ $nftables_lines -gt $iptables_lines ]; then
backend=nftables
else
backend=iptables
fi
fi
exec python -u /app/main.py $backend

File Metadata

Mime Type
text/x-shellscript
Expires
9月 9 Tue, 5:42 AM (7 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5328
默认替代文本
docker-entrypoint.sh (586 B)

Event Timeline