#1  
Old 26th June 2006, 00:04
Dimitriy Dimitriy is offline
Junior Member
 
Join Date: Jun 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default Startup script?

startup
Code:
modprobe ipt_MASQUERADE
iptables -F; iptables -t nat -F; iptables -t mangle -F
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 71.231.xx.xx
echo 1 > /proc/sys/net/ipv4/ip_forward

/etc/init.d/dhcp3-server start

/etc/init.d/ispconfig_server start
1. How add comments to this file? Is it "#" or "//" or something else?

2. How to add this script to startup in Ubuntu (and other Distros...)?

3. Do you consider this a clean/proper way to run your needed processes?

I made this mini script so that I could add things to my startup without having to hassle on remembering each process and such. Also I am never worried about restarting and facing a issue where something doesnt work when something wasnt started.

Its handy for me at least.

My two cents,
Dimitriy

PS. The script/file needs to be executable. I dont remember the exact command (something like chmod+x 0666 or something) but if anybody knows be sure to mention it here.
Reply With Quote
Sponsored Links
  #2  
Old 26th June 2006, 12:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
 
Default

Quote:
Originally Posted by Dimitriy
1. How add comments to this file? Is it "#" or "//" or something else?
It's #.
Quote:
Originally Posted by Dimitriy
2. How to add this script to startup in Ubuntu (and other Distros...)?
Place the script in /etc/init.d, then make it executable:
Code:
chmod 755 /etc/init.d/name_of_script
Then run this:
Code:
update-rc.d name_of_script defaults
This will add the system startup links for the script.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 13:29
Shell Script Need Help mphayesuk Programming/Scripts 4 27th June 2006 12:06
Firewall script ColdDoT Server Operation 1 8th May 2006 23:50
Script questions && Gentoo version hagel Feature Requests 4 7th May 2006 13:19
Location of ISPConfig startup command cchamb2 General 3 6th April 2006 00:02


All times are GMT +2. The time now is 16:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.