Hello.
Here is my problem:
- Presume you have two simple bash scripts in ~ on machine1:
[EMAIL PROTECTED] ~]$ cat s1.sh
#!/bin/bash
for ((i=1; i<=60; i++)); do
echo "$0: line $i"
sleep 1
done
[EMAIL PROTECTED] ~]$
[EMAIL PROTECTED] ~]$ cat s2.sh
#!/bin/bash
for ((i=1; i<=30; i++)); do
echo "$0: line $i"
sleep 1
done
[EMAIL PROTECTED] ~]$
- Now presume you have "screenrc" file in ~ with the following content:
[EMAIL PROTECTED] ~]$ cat screenrc
caption always "%{= kc}%H [%t] (system load: %l)%-23=%{= .m}%c:%s %D %
d.%m.%Y"
screen ./s1.sh
title "S1 script"
screen ./s2.sh
title "S2 script"
[EMAIL PROTECTED] ~]$
You can start both scripts simultaneously using "screen":
[EMAIL PROTECTED] ~]$ screen -c screenrc
But here is the problem:
I need to execute the "screen -c screenrc" command in background on the
machine1, but from a different machine - machine2. STAF command (on
machine2) should just start the "screen -c screenrc" on the remote
machine (machine1) and should exit right after that. And both scripts
(s1.sh and s2.sh) should be running in the background on machine1 and I
should be able to reattach this screen (on machine1 with "screen -r -d"
command) for monitoring purposes.
Apparently this does not work:
[EMAIL PROTECTED] ~]# staf machine1 PROCESS START SHELL COMMAND "screen
-c /home.local/auto/screenrc" WORKDIR "/home.local/auto" NEWCONSOLE
RETURNSTDOUT STDERRTOSTDOUT WAIT
Response
--------
{
Return Code: 1
Key : <None>
Files : [
{
Return Code: 0
Data : Must be connected to a terminal.
}
]
}
[EMAIL PROTECTED] ~]#
Any suggestions?
Thank you!
Plamen Nedkov
"Tumbleweed Communications <tumbleweed.com>" made the following
annotations on 10/17/08, 07:31:07
------------------------------------------------------------------------------
=== Tumbleweed Communications Disclaimer ===
This e-mail, including attachments, may include confidential and/or proprietary
information, and may be used only by the person or entity to which it is
addressed. If the reader of this e-mail is not the intended recipient or his
or her authorized agent, the reader is hereby notified that any dissemination,
distribution or copying of this e-mail is prohibited. If you have received this
e-mail in error, please notify the sender by replying to this message and
delete this e-mail immediately.
Tumbleweed Communications Corp., an industry leader in managed file
transfer and content security, provides enterprise-class solutions to
organizations of all sizes. Tumbleweed's innovative products enable
organizations to effectively manage and protect business-critical
Internet communications, with capabilities that span secure file
transfer, encryption, data loss prevention, and email security.
==============================================================================
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users