[CentOS] good shell script examples?

2010-11-15 Thread Kill Script
I am looking for a beginner guide to shell scripting simple tasks on CentOS (e.g. ssh'ing into a server / router / switch, checking for certain things, then exiting and going to the next IP). Does anyone have any suggestions on where to look? (I'm relatively new to bash) _

Re: [CentOS] good shell script examples?

2010-11-15 Thread Kill Script
I wrote a simple one a few years back: > http://www.happyhacker.org/gtmhh/basha.shtml This is great! Thanks for sharing. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos

Re: [CentOS] good shell script examples?

2010-11-16 Thread Kill Script
Gabriel Tabares wrote: > If you don't want to use ssh keys, you will have to write scripts that > interact with prompts, so you'll probably be looking at Expect, Python > (pexpect or paramiko) or Perl. In one case, this is what I have to do for some networking hardware. I have to ssh in, run a c

[CentOS] best way to start and shutdown programs in CentOS?

2010-11-21 Thread Kill Script
I have a Java program that I want to start up with every boot, but I'm unsure how to do it. There are two bootup scripts that start manually (script1.sh and script2.sh), and when the server gets shutdown, we have another script that we run (shutdownscript.sh) so that the DB does not get corrupted.

Re: [CentOS] best way to start and shutdown programs in CentOS?

2010-11-21 Thread Kill Script
On Sun, Nov 21, 2010 at 8:18 PM, John R Pierce wrote: > you would create a script in /etc/rc.d/init.d/ called yourjavathing, > which takes the parameter {start|stop} and optionally > {reload|restart|status} ... this script would include the header lines for > chkconfig. its run by init as th

Re: [CentOS] best way to start and shutdown programs in CentOS?

2010-11-22 Thread Kill Script
On Mon, Nov 22, 2010 at 9:36 AM, Brian Mathis wrote: > It may be tempting to use the rc.local, but that's the quick and dirty > way and not good for the long-term sustainability and management of a > system. There's no way to individually control any service running > from there, and no way to st

Re: [CentOS] best way to start and shutdown programs in CentOS?

2010-11-22 Thread Kill Script
2010/11/22 Jorge Fábregas > I totally agree. My suggestion was based on the assumption that the OP > didn't > have much system-administration experience and using rc.local was > definitely > the easiest way out. > Exactly... The OP was recommended that by someone else but thought better than t

Re: [CentOS] best way to start and shutdown programs in CentOS?

2010-11-22 Thread Kill Script
On Mon, Nov 22, 2010 at 8:03 PM, John R Pierce wrote: >su-$ORA_OWNER -c $ORA_HOME/bin/dbstart > > should be > >su - $ORA_OWNER -c $ORA_HOME/bin/dbstart > So, for a Java program, would you suggest creating a different user, giving that user just enough privileges, and then running