dockerfiles/anylink/docker_entrypoint.sh

24 lines
293 B
Bash
Raw Normal View History

2021-06-08 20:45:26 +08:00
#!/bin/sh
var1=$1
#set -x
case $var1 in
"bash" | "sh")
echo $var1
exec "$@"
;;
"tool")
/app/anylink "$@"
;;
*)
sysctl -w net.ipv4.ip_forward=1
2023-04-26 22:17:10 +08:00
#iptables -t nat -A POSTROUTING -s "${IPV4_CIDR}" -o eth0+ -j MASQUERADE
#iptables -nL -t nat
2021-06-08 20:45:26 +08:00
2021-12-31 20:21:26 +08:00
exec /app/anylink "$@"
2021-06-08 20:45:26 +08:00
;;
esac