This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: setting environment for bash running via cygserver
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 09 Sep 2011 17:15:54 -0400
- Subject: Re: setting environment for bash running via cygserver
- References: <loom.20110909T192501-772@post.gmane.org>
- Reply-to: cygwin at cygwin dot com
On 9/9/2011 1:44 PM, Alan Sinclair wrote:
Where can I set environment variables which will be available in a
bash script running under cygserver?
I need to ssh onto a remote cygserver and run bash scripts. RSA keys
are all set up so no password is needed and I can ssh onto the target
machine just fine by doing
ssh me@machine bash ~/myscript.sh ARGS
But myscript.sh is not getting the environment it needs. For example,
the script needs PROGRAMFILES, and also needs PROCESSOR_ARCHITEW6432
set in the environment on 64-bit OS.
Best to put them in a file you can source when you SSH into the other
machine. For the case above, you could then source that in your script
or in some appropriate rc file if "SSH_CLIENT" is set in your environment.
--
Larry
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple