Sponsored Content
Full Discussion: Servers Stop and Start
Top Forums Shell Programming and Scripting Servers Stop and Start Post 302279092 by zaxxon on Thursday 22nd of January 2009 01:25:04 AM
Old 01-22-2009
With instances I guess you mean database instances of any kind. Maybe it is ok for you to get the environment like this and then start the stuff you have to start:

Example:
Code:
...
su - user1 -c "startinst1"
su - user2 -c "startinst2"
...

The environment from the .profile etc. will be taken into account. Also if you don't have to be the user but need the environment, you can also just "source" the environment files for your instances with this:

Example:
Code:
. /path/to/environment/file/of/instance1/.profile
. /path/to/environment/file/of/instance1/.special_env

With "env" you can see what is set in your current environment.

Best play around with all this to get a feeling for it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Start/Stop Script

I'm a newbie to the Unix world Help! I have to maintain a host of Sybase database servers sitting on Unix Sun Solaris 8...I've been tasked with finding/creating a way to auto start/stop Unix via unix commands, specifically when the Unix servers need to be restarted we want Sybase to start... (2 Replies)
Discussion started by: jjv1
2 Replies

2. UNIX for Dummies Questions & Answers

Stop/Start proftpd

Hi everyone, I was wondering how to configure ftp access for one user when I found this board. After some searches I found my infos around proftpd (and the great config file proftpd.conf who answered to all my dreams...) but now I only need to stop proftpd and restart it (I guess it is needed... (1 Reply)
Discussion started by: Lomic
1 Replies

3. AIX

Start Stop Apache

I am in the process of reorging my Lawson db. I need to turn off the RMI server...not a problem. However my instructions also state that I must also shutdown my Servlet Container....I believe it is Apache. I have looked in /usr/apache/bin/apachectl What is the command for stopping and... (2 Replies)
Discussion started by: MILLERJ62
2 Replies

4. HP-UX

ypbind start/stop

Hi, How to start or stop ypbind on HP-UX machine. Searched a little but could not find. thanks, (2 Replies)
Discussion started by: jredx
2 Replies

5. Shell Programming and Scripting

Start Stop Restart

I'm wondering how I should make a script that can start, stop, and restart another script. What I need to be able to do, is start and stop a perl script from the command line. The easiest way of doing this seems to be to have another script, starting and stopping the other script. I have BASH,... (7 Replies)
Discussion started by: Bakes
7 Replies

6. Shell Programming and Scripting

Servers Start and Stop

HI I am using below code to start and stop servers but it is not working ,how to run the script please suggest me ,if any errors in the script please let me know. #!/bin/bash IMS_START="/Webserver/AppServer/bin/startServer.sh" IMS_STOP="/Webserver/AppServer/bin/stopServer.sh" case "$1" in ... (1 Reply)
Discussion started by: RG18173
1 Replies

7. Solaris

How to start/stop processes

Please anyone tell me In my last interview the HR asks me how to monitor, start,stop & kill the various processes and subprocesses. Please anyone explain me clearly. It's my personal request (3 Replies)
Discussion started by: suneelieg
3 Replies

8. UNIX for Dummies Questions & Answers

Stop/Start vs. Restart

Is there any functional difference between: issuing separate stop/start commands like this; super (handler) (instance) stop super (handler) (instance) start versus issuing a single recycle command like this; super (handler) (instance) restart (3 Replies)
Discussion started by: Newbix
3 Replies

9. UNIX for Dummies Questions & Answers

factor [start[stop]

Another question for you guys! This is so fun. So I am playing around with the factor operation. I read in "man factor" that you can actually print a list of primes in between a range, using the syntax factor ] However, every time I enter two values, it just returns the factored value.... (1 Reply)
Discussion started by: statichazard
1 Replies

10. Shell Programming and Scripting

how to specify start and stop of a search string

I am trying to extract a string from a line of text. Currently I am using grep -o 'startofstring(.........' The string is not always the same size. The string I'm trying to extract starts with 'test(' ends with ')'. ex "blah,blah,blah,test(stringoftext),blah blah" How do I... (4 Replies)
Discussion started by: jeepguy
4 Replies
env(1)							      General Commands Manual							    env(1)

NAME
env - set environment for command execution SYNOPSIS
[name value] ... [command [arguments ...]] DESCRIPTION
obtains the current environment, modifies it according to its arguments, then executes the command with the modified environment. Argu- ments of the form are merged into the inherited environment before the command is executed. The option causes the inherited environment to be ignored completely so that the command is executed with exactly the environment specified by the arguments. The option is obsolete and has the same effect as the option. If no command is specified, the resulting environment is printed, one name-value pair per line. RETURN VALUE
If command is invoked, the exit status of is the exit status of command; otherwise, exits with one of the following values: 0 completed successfully. 1-125 encountered an error. 126 command was found but could not be invoked. 127 command could not be found. EXTERNAL INFLUENCES
Environment Variables determines the language in which messages are displayed. If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari- able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multi-byte character code sets are supported. WARNING
The option is obsolete. Use instead. SEE ALSO
sh(1), exec(2), profile(4), environ(5). STANDARDS CONFORMANCE
env(1)
All times are GMT -4. The time now is 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy