S03ipv6 438 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:
  4. # Short-Description: Enable/Disable IPv6
  5. # Description: Enable/Disable IPv6 based on the user configuration
  6. ### END INIT INFO
  7. . /opt/wz_mini/wz_mini.conf
  8. case "$1" in
  9. start)
  10. echo "#####$(basename "$0")#####"
  11. if ! [[ "$ENABLE_IPV6" == "true" ]]; then
  12. sysctl -w net.ipv6.conf.all.disable_ipv6=1
  13. echo "ipv6 disabled"
  14. fi
  15. ;;
  16. *)
  17. echo "Usage: $0 {start}"
  18. exit 1
  19. ;;
  20. esac