• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux iptables starting at boot

fera holy kina

Ubuntu 10.04
Joined
Jan 27, 2009
Messages
192
Reaction score
5
was testing some iptables
I found one until the legal issue and is running them everytime I restart the server

someone could teach me how they start the bot?
I put them in a. sh would be possible?

1000 Apologize for my bad English.

Ubuntu 10.04

This way would work?

script:
#!/bin/bash
#
# /etc/init.d/meuScript

case "$1" in
start)
echo "Iniciando serviço..."
# comando para iniciar o serviço
;;

stop)
echo "Parando serviço..."
# comando para parar o serviço
;;

restart)
echo "Reiniciando serviço..."
# comando para reiniciar o serviço
;;

*)
echo "Operação inválida"
;;
esac

Give execute permission to the script:

# chmod +x meuScript

From that moment I could run the following commands:

# /etc/init.d/meuScript start
# /etc/init.d/meuScript stop
# /etc/init.d/meuScript restart

To insert the script at system startup, use the command update-rc.d as follows:

# update-rc.d meuScript defaults

To remove the startup script:

# update-rc.d -f meuScript remove

So someone can tell me if going to work this way?
 
Last edited:
Back
Top