JonathanFerguson

Differences between revisions 1 and 53 (spanning 52 versions)
Revision 1 as of 2006-09-23 06:16:39
Size: 282
Editor: dsl-186
Comment: Jonathan Ferguson
Revision 53 as of 2012-09-15 04:57:16
Size: 10601
Comment: ./Quagga
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
----
''[https://wiki.edubuntu.org/JonathanFerguson]''
----
[[BR]]
[[BR]]
'''[http://Jonathan-Ferguson.tk/ Jonathan Ferguson]'''
[[BR]]
[[BR]][https://shipit.edubuntu.org/ Shipit: Edubuntu]
[[BR]][https://launchpad.net/people/jonathan-ferguson Launchpad: Jonathan Ferguson]
#!/bin/bash

########################################################################################
# #
# Computer Program ./Quagga #
# Version 3 Saturday, 15 September, 2012 #
# Jonathan Ferguson http://Jonathan-Ferguson.tk/ #
# Copyright Act 1968 http://www.comlaw.gov.au/Current/C2012C00265 #
# #
########################################################################################

case "$1" in
 'remove')
  sudo /etc/init.d/quagga stop
  if [ $? -eq 0 ]
  then
   echo -e "\n\t[ Good ]\tWe have stopped the quagga daemon\n"
  else
   echo -e "\n\t[ Bad ]\t\tWe failed to stop the quagga daemon\n"
   exit 1
  fi

  sleep 10 \
  && sudo sed -i '/net.ipv6.conf.default.forwarding=1/d' /etc/sysctl.conf \
  && sed 's/net.ipv6.conf.all.forwarding=1/#net.ipv6.conf.all.forwarding=1/g' /etc/sysctl.conf | sudo tee /etc/sysctl.conf \
  && sudo sed -i '/net.ipv4.conf.default.forwarding=1/d' /etc/sysctl.conf \
  && sudo sed -i '/net.ipv4.conf.all.forwarding=1/d' /etc/sysctl.conf \
  && sudo sysctl -p
  if [ $? -eq 0 ]
  then
   echo -e "\n\t[ Good ]\tWe have disabled IP forwarding\n"
  else
   echo -e "\n\t[ Bad ]\t\tWe failed to disable IP forwarding\n"
   exit 1
  fi

  sleep 10 \
  && sudo rm /etc/quagga/bgpd.conf \
  && sudo rm /etc/quagga/isisd.conf \
  && sudo rm /etc/quagga/ospf6d.conf \
  && sudo rm /etc/quagga/ospfd.conf \
  && sudo rm /etc/quagga/ripd.conf \
  && sudo rm /etc/quagga/ripngd.conf \
  && sudo rm /etc/quagga/vtysh.conf \
  && sudo rm /etc/quagga/zebra.conf
  if [ $? -eq 0 ]
  then
   echo -e "\t[ Good ]\tWe have deleted Quagga's configuration files\n"
  else
   echo -e "\t[ Bad ]\t\tWe failed to delete Quagga's configuration files\n"
   exit 1
  fi

  sudo dpkg --purge quagga
  if [ $? -eq 0 ]
  then
   echo -e "\n\t[ Good ]\tYou're finished\n"
  else
   echo -e "\n\t[ Bad ]\t\tWe failed to uninstall quagga\n"
   exit 1
  fi

  exit 0
 ;;

 'install')
  sudo apt-get -y install quagga
  if [ $? -eq 0 ]
  then
   echo -e "\n\t[ Good ]\tWe have installed quagga\n"
  else
   echo -e "\n\t[ Bad ]\t\tWe failed to install quagga\n"
   exit 1
  fi

  sleep 10 \
  && sudo wget --no-cache --no-check-certificate -O /tmp/bgpd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=bgpd.conf" \
  && sudo wget --no-cache --no-check-certificate -O /tmp/isisd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=isisd.conf" \
  && sudo wget --no-cache --no-check-certificate -O /tmp/ospf6d.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=ospf6d.conf" \
  && sudo wget --no-cache --no-check-certificate -O /tmp/ospfd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=ospfd.conf" \
  && sudo wget --no-cache --no-check-certificate -O /tmp/ripd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=ripd.conf" \
  && sudo wget --no-cache --no-check-certificate -O /tmp/ripngd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=ripngd.conf" \
  && sudo wget --no-cache --no-check-certificate -O /tmp/vtysh.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=vtysh.conf" \
  && sudo wget --no-cache --no-check-certificate -O /tmp/zebra.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=zebra.conf"
  if [ $? -eq 0 ]
  then
   echo -e "\t[ Good ]\tWe have downloaded the configuration files for quagga\n"
  else
   echo -e "\t[ Bad ]\t\tWe failed to download the configuration files for quagga\n"
   exit 1
  fi

  sleep 10 \
  && sudo mv -f /tmp/bgpd.conf /etc/quagga/bgpd.conf \
  && sudo mv -f /tmp/isisd.conf /etc/quagga/isisd.conf \
  && sudo mv -f /tmp/ospf6d.conf /etc/quagga/ospf6d.conf \
  && sudo mv -f /tmp/ospfd.conf /etc/quagga/ospfd.conf \
  && sudo mv -f /tmp/ripd.conf /etc/quagga/ripd.conf \
  && sudo mv -f /tmp/ripngd.conf /etc/quagga/ripngd.conf \
  && sudo mv -f /tmp/vtysh.conf /etc/quagga/vtysh.conf \
  && sudo mv -f /tmp/zebra.conf /etc/quagga/zebra.conf
  if [ $? -eq 0 ]
  then
   echo -e "\t[ Good ]\tWe have moved the configuration files to /etc/quagga\n"
  else
   echo -e "\t[ Bad ]\t\tWe failed to move the configuration files to /etc/quagga\n"
   exit 1
  fi

  sleep 10 \
  && sudo chown quagga:quagga /etc/quagga/bgpd.conf \
  && sudo chown quagga:quagga /etc/quagga/isisd.conf \
  && sudo chown quagga:quagga /etc/quagga/ospf6d.conf \
  && sudo chown quagga:quagga /etc/quagga/ospfd.conf \
  && sudo chown quagga:quagga /etc/quagga/ripd.conf \
  && sudo chown quagga:quagga /etc/quagga/ripngd.conf \
  && sudo chown quagga:quaggavty /etc/quagga/vtysh.conf \
  && sudo chown quagga:quagga /etc/quagga/zebra.conf
  if [ $? -eq 0 ]
  then
   echo -e "\t[ Good ]\tWe have made Quagga the owner of his configuration files\n"
  else
   echo -e "\t[ Bad ]\t\tWe failed to make Quagga the owner of his configuration files\n"
   exit 1
  fi

  sleep 10 \
  && sudo chmod 640 /etc/quagga/bgpd.conf \
  && sudo chmod 640 /etc/quagga/isisd.conf \
  && sudo chmod 640 /etc/quagga/ospf6d.conf \
  && sudo chmod 640 /etc/quagga/ospfd.conf \
  && sudo chmod 640 /etc/quagga/ripd.conf \
  && sudo chmod 640 /etc/quagga/ripngd.conf \
  && sudo chmod 660 /etc/quagga/vtysh.conf \
  && sudo chmod 640 /etc/quagga/zebra.conf
  if [ $? -eq 0 ]
  then
   echo -e "\t[ Good ]\tWe have changed the mode of Quagga's configuration files\n"
  else
   echo -e "\t[ Bad ]\t\tWe failed to change the mode of Quagga's configuration files\n"
   exit 1
  fi

  sleep 10 \
  && sudo sed -i 's/zebra=no/zebra=yes/g' /etc/quagga/daemons \
  && sudo sed -i 's/bgpd=no/bgpd=yes/g' /etc/quagga/daemons \
  && sudo sed -i 's/ospfd=no/ospfd=yes/g' /etc/quagga/daemons \
  && sudo sed -i 's/ospf6d=no/ospf6d=yes/g' /etc/quagga/daemons \
  && sudo sed -i 's/ripd=no/ripd=yes/g' /etc/quagga/daemons \
  && sudo sed -i 's/ripngd=no/ripngd=yes/g' /etc/quagga/daemons \
  && sudo sed -i 's/isisd=no/isisd=yes/g' /etc/quagga/daemons
  if [ $? -eq 0 ]
  then
   echo -e "\t[ Good ]\tWe have altered /etc/quagga/daemons\n"
  else
   echo -e "\t[ Bad ]\t\tWe failed to alter /etc/quagga/daemons\n"
   exit 1
  fi

  sleep 10 \
  && sudo sed -i 's/zebra_options=" --daemon -A 127.0.0.1"/zebra_options=" --daemon -A 127.0.0.1 -P 2601 -u quagga --keep_kernel --retain"/g' /etc/quagga/debian.conf \
  && sudo sed -i 's/bgpd_options=" --daemon -A 127.0.0.1"/bgpd_options=" --daemon -A 127.0.0.1 -P 2605 -u quagga --retain -p 179"/g' /etc/quagga/debian.conf \
  && sudo sed -i 's/ospfd_options=" --daemon -A 127.0.0.1"/ospfd_options=" --daemon -A 127.0.0.1 -P 2604 -u quagga"/g' /etc/quagga/debian.conf \
  && sudo sed -i 's/ospf6d_options="--daemon -A ::1"/ospf6d_options=" --daemon -A ::1 -P 2606 -u quagga"/g' /etc/quagga/debian.conf \
  && sudo sed -i 's/ripd_options=" --daemon -A 127.0.0.1"/ripd_options=" --daemon -A 127.0.0.1 -P 2602 -u quagga --retain"/g' /etc/quagga/debian.conf \
  && sudo sed -i 's/ripngd_options="--daemon -A ::1"/ripngd_options=" --daemon -A ::1 -P 2603 -u quagga --retain"/g' /etc/quagga/debian.conf \
  && sudo sed -i 's/isisd_options=" --daemon -A 127.0.0.1"/isisd_options=" --daemon -A 127.0.0.1 -P 2608 -u quagga"/g' /etc/quagga/debian.conf
  if [ $? -eq 0 ]
  then
   echo -e "\t[ Good ]\tWe have altered /etc/quagga/debian.conf\n"
  else
   echo -e "\t[ Bad ]\t\tWe failed to alter /etc/quagga/debian.conf\n"
   exit 1
  fi

  sleep 10 \
  && grep net.ipv4.conf.all.forwarding=1 /etc/sysctl.conf
  if [ $? -eq 1 ]
  then
   echo "net.ipv4.conf.all.forwarding=1" | sudo tee -a /etc/sysctl.conf
  fi
  grep net.ipv4.conf.default.forwarding=1 /etc/sysctl.conf
  if [ $? -eq 1 ]
  then
   echo "net.ipv4.conf.default.forwarding=1" | sudo tee -a /etc/sysctl.conf
  fi
  sed 's/#net.ipv6.conf.all.forwarding=1/net.ipv6.conf.all.forwarding=1/g' /etc/sysctl.conf | sudo tee /etc/sysctl.conf \
  && grep net.ipv6.conf.default.forwarding=1 /etc/sysctl.conf
  if [ $? -eq 1 ]
  then
   echo "net.ipv6.conf.default.forwarding=1" | sudo tee -a /etc/sysctl.conf
  fi
  sudo sysctl -p
  if [ $? -eq 0 ]
  then
   echo -e "\n\t[ Good ]\tWe have enabled IP forwarding\n"
  else
   echo -e "\n\t[ Bad ]\t\tWe failed to enable IP forwarding\n"
   exit 1
  fi

  sleep 10 \
  && sudo /etc/init.d/quagga restart
  if [ $? -eq 0 ]
  then
   echo -e "\n\t[ Good ]\tWe're done\n"
  else
   echo -e "\n\t[ Bad ]\t\tWe failed to restart the quagga daemon\n"
   exit 1
  fi

  exit 0
 ;;

 '')
  if [[ -f /etc/quagga/bgpd.conf && -f /etc/quagga/isisd.conf && -f /etc/quagga/ospf6d.conf && -f /etc/quagga/ospfd.conf && -f /etc/quagga/ripd.conf && -f /etc/quagga/ripngd.conf && -f /etc/quagga/vtysh.conf && -f /etc/quagga/zebra.conf ]]
  then
   declare currently="Installed"
  elif [[ -f /etc/quagga/bgpd.conf || -f /etc/quagga/isisd.conf || -f /etc/quagga/ospf6d.conf || -f /etc/quagga/ospfd.conf || -f /etc/quagga/ripd.conf || -f /etc/quagga/ripngd.conf || -f /etc/quagga/vtysh.conf || -f /etc/quagga/zebra.conf ]]
  then
   declare currently="Needs to be reinstalled"
  else
   declare currently="Not installed"
  fi

  echo -e "\nCurrently:\t$currently\n"
  echo -e "Install:\tsudo ./Quagga install"
  echo -e "Reinstall:\tsudo ./Quagga install"
  echo -e "Uninstall:\tsudo ./Quagga remove\n"

  exit 0
 ;;
esac

########################################################################################
# #
# Computer Program ./Quagga #
# Version 3 Saturday, 15 September, 2012 #
# Jonathan Ferguson http://Jonathan-Ferguson.tk/ #
# Copyright Act 1968 http://www.comlaw.gov.au/Current/C2012C00265 #
# #
########################################################################################

# # # Computer Program ./Quagga # # Version 3 Saturday, 15 September, 2012 # # Jonathan Ferguson http://Jonathan-Ferguson.tk/ # # Copyright Act 1968 http://www.comlaw.gov.au/Current/C2012C00265 # # #

case "$1" in

  • 'remove')
    • sudo /etc/init.d/quagga stop if [ $? -eq 0 ] then
      • echo -e "\n\t[ Good ]\tWe have stopped the quagga daemon\n"
      else
      • echo -e "\n\t[ Bad ]\t\tWe failed to stop the quagga daemon\n" exit 1
      fi sleep 10 \

      && sudo sed -i '/net.ipv6.conf.default.forwarding=1/d' /etc/sysctl.conf \ && sed 's/net.ipv6.conf.all.forwarding=1/#net.ipv6.conf.all.forwarding=1/g' /etc/sysctl.conf | sudo tee /etc/sysctl.conf \ && sudo sed -i '/net.ipv4.conf.default.forwarding=1/d' /etc/sysctl.conf \ && sudo sed -i '/net.ipv4.conf.all.forwarding=1/d' /etc/sysctl.conf \ && sudo sysctl -p if [ $? -eq 0 ] then

      • echo -e "\n\t[ Good ]\tWe have disabled IP forwarding\n"
      else
      • echo -e "\n\t[ Bad ]\t\tWe failed to disable IP forwarding\n" exit 1
      fi sleep 10 \

      && sudo rm /etc/quagga/bgpd.conf \ && sudo rm /etc/quagga/isisd.conf \ && sudo rm /etc/quagga/ospf6d.conf \ && sudo rm /etc/quagga/ospfd.conf \ && sudo rm /etc/quagga/ripd.conf \ && sudo rm /etc/quagga/ripngd.conf \ && sudo rm /etc/quagga/vtysh.conf \ && sudo rm /etc/quagga/zebra.conf if [ $? -eq 0 ] then

      • echo -e "\t[ Good ]\tWe have deleted Quagga's configuration files\n"
      else
      • echo -e "\t[ Bad ]\t\tWe failed to delete Quagga's configuration files\n" exit 1
      fi sudo dpkg --purge quagga if [ $? -eq 0 ] then
      • echo -e "\n\t[ Good ]\tYou're finished\n"
      else
      • echo -e "\n\t[ Bad ]\t\tWe failed to uninstall quagga\n" exit 1
      fi exit 0
    ;; 'install')
    • sudo apt-get -y install quagga if [ $? -eq 0 ] then
      • echo -e "\n\t[ Good ]\tWe have installed quagga\n"
      else
      • echo -e "\n\t[ Bad ]\t\tWe failed to install quagga\n" exit 1
      fi sleep 10 \

      && sudo wget --no-cache --no-check-certificate -O /tmp/bgpd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=bgpd.conf" \ && sudo wget --no-cache --no-check-certificate -O /tmp/isisd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=isisd.conf" \ && sudo wget --no-cache --no-check-certificate -O /tmp/ospf6d.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=ospf6d.conf" \ && sudo wget --no-cache --no-check-certificate -O /tmp/ospfd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=ospfd.conf" \ && sudo wget --no-cache --no-check-certificate -O /tmp/ripd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=ripd.conf" \ && sudo wget --no-cache --no-check-certificate -O /tmp/ripngd.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=ripngd.conf" \ && sudo wget --no-cache --no-check-certificate -O /tmp/vtysh.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=vtysh.conf" \ && sudo wget --no-cache --no-check-certificate -O /tmp/zebra.conf "https://wiki.ubuntu.com/JonathanFerguson/Quagga?action=AttachFile&do=get&target=zebra.conf" if [ $? -eq 0 ] then

      • echo -e "\t[ Good ]\tWe have downloaded the configuration files for quagga\n"
      else
      • echo -e "\t[ Bad ]\t\tWe failed to download the configuration files for quagga\n" exit 1
      fi sleep 10 \

      && sudo mv -f /tmp/bgpd.conf /etc/quagga/bgpd.conf \ && sudo mv -f /tmp/isisd.conf /etc/quagga/isisd.conf \ && sudo mv -f /tmp/ospf6d.conf /etc/quagga/ospf6d.conf \ && sudo mv -f /tmp/ospfd.conf /etc/quagga/ospfd.conf \ && sudo mv -f /tmp/ripd.conf /etc/quagga/ripd.conf \ && sudo mv -f /tmp/ripngd.conf /etc/quagga/ripngd.conf \ && sudo mv -f /tmp/vtysh.conf /etc/quagga/vtysh.conf \ && sudo mv -f /tmp/zebra.conf /etc/quagga/zebra.conf if [ $? -eq 0 ] then

      • echo -e "\t[ Good ]\tWe have moved the configuration files to /etc/quagga\n"
      else
      • echo -e "\t[ Bad ]\t\tWe failed to move the configuration files to /etc/quagga\n" exit 1
      fi sleep 10 \

      && sudo chown quagga:quagga /etc/quagga/bgpd.conf \ && sudo chown quagga:quagga /etc/quagga/isisd.conf \ && sudo chown quagga:quagga /etc/quagga/ospf6d.conf \ && sudo chown quagga:quagga /etc/quagga/ospfd.conf \ && sudo chown quagga:quagga /etc/quagga/ripd.conf \ && sudo chown quagga:quagga /etc/quagga/ripngd.conf \ && sudo chown quagga:quaggavty /etc/quagga/vtysh.conf \ && sudo chown quagga:quagga /etc/quagga/zebra.conf if [ $? -eq 0 ] then

      • echo -e "\t[ Good ]\tWe have made Quagga the owner of his configuration files\n"
      else
      • echo -e "\t[ Bad ]\t\tWe failed to make Quagga the owner of his configuration files\n" exit 1
      fi sleep 10 \

      && sudo chmod 640 /etc/quagga/bgpd.conf \ && sudo chmod 640 /etc/quagga/isisd.conf \ && sudo chmod 640 /etc/quagga/ospf6d.conf \ && sudo chmod 640 /etc/quagga/ospfd.conf \ && sudo chmod 640 /etc/quagga/ripd.conf \ && sudo chmod 640 /etc/quagga/ripngd.conf \ && sudo chmod 660 /etc/quagga/vtysh.conf \ && sudo chmod 640 /etc/quagga/zebra.conf if [ $? -eq 0 ] then

      • echo -e "\t[ Good ]\tWe have changed the mode of Quagga's configuration files\n"
      else
      • echo -e "\t[ Bad ]\t\tWe failed to change the mode of Quagga's configuration files\n" exit 1
      fi sleep 10 \

      && sudo sed -i 's/zebra=no/zebra=yes/g' /etc/quagga/daemons \ && sudo sed -i 's/bgpd=no/bgpd=yes/g' /etc/quagga/daemons \ && sudo sed -i 's/ospfd=no/ospfd=yes/g' /etc/quagga/daemons \ && sudo sed -i 's/ospf6d=no/ospf6d=yes/g' /etc/quagga/daemons \ && sudo sed -i 's/ripd=no/ripd=yes/g' /etc/quagga/daemons \ && sudo sed -i 's/ripngd=no/ripngd=yes/g' /etc/quagga/daemons \ && sudo sed -i 's/isisd=no/isisd=yes/g' /etc/quagga/daemons if [ $? -eq 0 ] then

      • echo -e "\t[ Good ]\tWe have altered /etc/quagga/daemons\n"
      else
      • echo -e "\t[ Bad ]\t\tWe failed to alter /etc/quagga/daemons\n" exit 1
      fi sleep 10 \

      && sudo sed -i 's/zebra_options=" --daemon -A 127.0.0.1"/zebra_options=" --daemon -A 127.0.0.1 -P 2601 -u quagga --keep_kernel --retain"/g' /etc/quagga/debian.conf \ && sudo sed -i 's/bgpd_options=" --daemon -A 127.0.0.1"/bgpd_options=" --daemon -A 127.0.0.1 -P 2605 -u quagga --retain -p 179"/g' /etc/quagga/debian.conf \ && sudo sed -i 's/ospfd_options=" --daemon -A 127.0.0.1"/ospfd_options=" --daemon -A 127.0.0.1 -P 2604 -u quagga"/g' /etc/quagga/debian.conf \ && sudo sed -i 's/ospf6d_options="--daemon -A ::1"/ospf6d_options=" --daemon -A ::1 -P 2606 -u quagga"/g' /etc/quagga/debian.conf \ && sudo sed -i 's/ripd_options=" --daemon -A 127.0.0.1"/ripd_options=" --daemon -A 127.0.0.1 -P 2602 -u quagga --retain"/g' /etc/quagga/debian.conf \ && sudo sed -i 's/ripngd_options="--daemon -A ::1"/ripngd_options=" --daemon -A ::1 -P 2603 -u quagga --retain"/g' /etc/quagga/debian.conf \ && sudo sed -i 's/isisd_options=" --daemon -A 127.0.0.1"/isisd_options=" --daemon -A 127.0.0.1 -P 2608 -u quagga"/g' /etc/quagga/debian.conf if [ $? -eq 0 ] then

      • echo -e "\t[ Good ]\tWe have altered /etc/quagga/debian.conf\n"
      else
      • echo -e "\t[ Bad ]\t\tWe failed to alter /etc/quagga/debian.conf\n" exit 1
      fi sleep 10 \

      && grep net.ipv4.conf.all.forwarding=1 /etc/sysctl.conf if [ $? -eq 1 ] then

      • echo "net.ipv4.conf.all.forwarding=1" | sudo tee -a /etc/sysctl.conf
      fi grep net.ipv4.conf.default.forwarding=1 /etc/sysctl.conf if [ $? -eq 1 ] then
      • echo "net.ipv4.conf.default.forwarding=1" | sudo tee -a /etc/sysctl.conf
      fi sed 's/#net.ipv6.conf.all.forwarding=1/net.ipv6.conf.all.forwarding=1/g' /etc/sysctl.conf | sudo tee /etc/sysctl.conf \

      && grep net.ipv6.conf.default.forwarding=1 /etc/sysctl.conf if [ $? -eq 1 ] then

      • echo "net.ipv6.conf.default.forwarding=1" | sudo tee -a /etc/sysctl.conf
      fi sudo sysctl -p if [ $? -eq 0 ] then
      • echo -e "\n\t[ Good ]\tWe have enabled IP forwarding\n"
      else
      • echo -e "\n\t[ Bad ]\t\tWe failed to enable IP forwarding\n" exit 1
      fi sleep 10 \

      && sudo /etc/init.d/quagga restart if [ $? -eq 0 ] then

      • echo -e "\n\t[ Good ]\tWe're done\n"
      else
      • echo -e "\n\t[ Bad ]\t\tWe failed to restart the quagga daemon\n" exit 1
      fi exit 0
    ;;

    )

    ;;

esac

# # # Computer Program ./Quagga # # Version 3 Saturday, 15 September, 2012 # # Jonathan Ferguson http://Jonathan-Ferguson.tk/ # # Copyright Act 1968 http://www.comlaw.gov.au/Current/C2012C00265 # # #