LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-19-2011, 10:22 PM   #1
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 294

Rep: Reputation: 10
Is it possible to write script for this scenario??


Hi all,

We are hosting Webserver using Apache -tomcat , in our company we are following this way for our every new enhancement in production server.

for example if the developers move any new code moved to the server means that time we'll do

1.first check the time / date

2. mod_jk log which domain currently accessing our client,

3. and check the last 20 lines of the http_access log in http access log if the domain accessing from our side means that means we are using two static ip , in the http_access log in the last 20 lines our static ip(ex 122.65.77.88, 122.65.77.89) displayed means we then

4. stop the tomcat and killall the java process and again restart the tomcat process.

else

in the http_access log display any other ip means we check the time/date if the date/time is current date/time means we just hold the server restart for few mins otherwise we restart the server.

Note these all scenario happens while minor server push......

for this scenario is it possible to write the script ??? If possible means please guide me..

With Regards
Anish Kumar.V
 
Old 03-20-2011, 02:50 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

You can write a script for almost anything in Linux. Just take it one step at the time, one command after another, test every command to see if it gives you the required result on the command line and put everything in a script. Show us what you've got and where you're having trouble/errors and we'll take it from there.

Kind regards,

Eric
 
Old 03-20-2011, 08:35 AM   #3
huaihaizi3
LQ Newbie
 
Registered: Oct 2009
Location: BeiJing China
Distribution: Fedora
Posts: 19

Rep: Reputation: 0
Its obviously that almost everything can be done with scrips in Linux, just write down what you want the system to do ~!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me write script sharp859 Linux - Newbie 5 04-16-2009 05:41 PM
Better way to write this script faizlo Programming 6 01-08-2009 02:25 AM
how write a script saif Linux - Newbie 8 07-27-2007 12:31 PM
Write access to a 2nd HD (different scenario) griphiam Linux - Hardware 1 10-22-2003 09:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration