
diegotesch
(usa Ubuntu)
Enviado em 11/06/2013 - 08:56h
bom dia pessoal, estou configurando um servidor para um pequeno supermercado. está tudo correndo bem até agora que estou tentando fazer com que ele inicie algumas tarefas como: squid3, apache2, firewall logo no boot.
após ler um pouco a respeito vi que era possível fazê-lo inserindo as linhas no arquivo /etc/rc.local
desta forma meu arquivo ficou da seguinte forma
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
/etc/init.d/isc-dhcp-server start
/etc/init.d/squid3 start
/etc/init.d/apache2 start
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
exit 0
quero acrescentar mais algumas linhas de firewall porém como posso fazê-lo se ao bootar o servidor squid3 e apache2 não iniciaram?
alguém tem uma solução para tal problema