View previous topic :: View next topic |
Author |
Message |
nikc n00b
Joined: 29 Apr 2003 Posts: 23
|
Posted: Fri May 02, 2003 12:48 am Post subject: Shell Script Resource |
|
|
Im looking for a good online bash shell script resource so that I can try to figure out how to write some simple scripts.
Anyone know how to make a .sh script run only on a reboot/power on.
Thanks |
|
Back to top |
|
|
dirtyjake n00b
Joined: 06 Jul 2002 Posts: 60
|
Posted: Fri May 02, 2003 1:00 am Post subject: |
|
|
Quote: | Anyone know how to make a .sh script run only on a reboot/power on. |
You mean a rc-script? /etc/init.d has lots of examples. I don't quite know the equivalent of rc.local on Gentoo but an rc-script in /etc/init.d should do you fine.
As for Bash help, Google. |
|
Back to top |
|
|
PowerFactor Veteran
Joined: 30 Jan 2003 Posts: 1693 Location: out of it
|
Posted: Fri May 02, 2003 1:14 am Post subject: |
|
|
dirtyjake wrote: | I don't quite know the equivalent of rc.local on Gentoo... | /etc/conf.d/local.start for bootup and /etc/conf.d/local.stop for shutdown. Much easier than writing a full blown init script for simple tasks. |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Fri May 02, 2003 1:19 am Post subject: |
|
|
This is an excellent online guide. |
|
Back to top |
|
|
nikc n00b
Joined: 29 Apr 2003 Posts: 23
|
Posted: Fri May 02, 2003 1:39 am Post subject: |
|
|
Thats sites looks great im going to start reading now.
As for the start up script I am looking to have a script run anytime the system boots that will email me the ip so if it changes i can still ssh into the computer(its not going to have a monitor pluged in to it) |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Fri May 02, 2003 1:51 am Post subject: |
|
|
You may want to investigate dyndns. It is fairly painless and has several update clients including a masked one in portage.
nikc wrote: | ...
As for the start up script I am looking to have a script run anytime the system boots that will email me the ip so if it changes i can still ssh into the computer(its not going to have a monitor pluged in to it) |
|
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Fri May 02, 2003 3:29 am Post subject: |
|
|
Daniel Robbins has written some bash guides (as well as awk, sed and some others). You can find them here. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|