HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //etc/rc.d/rc5.d/S14ip6tables-retry
#!/bin/sh
#
# ip6tables-retry  Try to start ip6tables if it previously failed.
#
# chkconfig: 2345 14 92
# description: ip6tables-retry is a complete hack to try and restart ip6tables if
#
### BEGIN INIT INFO
# Provides: ip6tables-retry
# Required-Start: $network $ip6tables
# Required-Stop:
# Should-Start: $named $dnsmasq
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Try to restart ip6tables firewall on error.
# Description: ip6tables-retry is a complete hack to try and restart ip6tables if
#              it fails the first time.
### END INIT INFO

# Source function library.
. /etc/init.d/functions

# only usable for root
[ $EUID = 0 ] || exit 4

RETVAL=0

start() {
  if [ -f /tmp/ip6tables_retry ]; then
    /sbin/service ip6tables start
    RETVAL=$?
    /bin/rm /tmp/ip6tables_retry
  fi

  return $RETVAL
}

stop() {
  return 0
}

restart() {
  stop
  start
}

status() {
  return 1
}

case "$1" in
  start)
    start
    RETVAL=$?
    ;;
  stop)
    stop
    RETVAL=$?
    ;;
  restart|force-reload)
    restart
    RETVAL=$?
    ;;
  status)
    status
    RETVAL=$?
    ;;
  *)
    echo $"Usage: ip6tables-retry {start|stop|restart|status}"
    RETVAL=2
    ;;
esac

exit $RETVAL