Search Results

Search: Posts Made By: MacG32
9,524
Posted By neutronscott
I thought using screen -ls was more elegant. This...
I thought using screen -ls was more elegant. This is what I came up with:



#!/bin/sh
# chkscreen: checks if a screen session is running.
WORKINGDIR=/home/mute/test
PIDFILE=cb.pid...
9,524
Posted By neutronscott
screen will spawn a child, so I was thinking...
screen will spawn a child, so I was thinking using $$ from 'exec'


You'll be checking if jd.sh is running. If it's running, java must be.. If it's not running, screen would exit (unless you add...
9,524
Posted By neutronscott
Well I didn't actually lose sleep but thought of...
Well I didn't actually lose sleep but thought of it. As I said, and tested, using -r started new screens each time chkscreen is ran if I was attached, because it checks for attachable screens and it...
9,524
Posted By neutronscott
There's just many different ways it can be...
There's just many different ways it can be solved. Instead of keeping a PID file (my original trial) I just ask screen if the session is running. It makes it so elegant, eh? :)

Thanks for the...
9,524
Posted By neutronscott
Having screen as part of the equation at first...
Having screen as part of the equation at first seemed difficult for me. Then I read the manual...

Firstly, we create the crontab-able script which checks if the screen session is started.

...
9,524
Posted By neutronscott
And this has to stay inside of a screen session...
And this has to stay inside of a screen session because it's interactive, or just a way to view the output?

running your "exec" script in the background is not sufficient?

shell$ ./exec &
...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 12:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy