Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

plexidrive.sh shouldn't run if the script is already being executed #1

Closed
olipayne opened this issue May 4, 2017 · 7 comments
Closed

Comments

@olipayne
Copy link
Contributor

olipayne commented May 4, 2017

If plexidrive.sh checks to see if it's already running before executing, it would mean we can have a relatively frequent cronjob schedule.

@masonr
Copy link
Owner

masonr commented May 4, 2017

Agreed. I'll add that in shortly and update this issue when done.

@masonr
Copy link
Owner

masonr commented May 4, 2017

Fixed with commit 23fdebb. Added check at beginning of plexidrive.sh to ensure script is not already running.

@masonr masonr closed this as completed May 4, 2017
@masonr
Copy link
Owner

masonr commented May 4, 2017

Scratch that last commit. Reopening this issue and reverting the last commit as it prevents the script from being ran at all. Needs further investigation.

@masonr masonr reopened this May 4, 2017
@olipayne
Copy link
Contributor Author

olipayne commented May 4, 2017

Yeah I see that too, however I'm not sure why it doesnt work with an if [ "$precheck" -gt 2 ] ; then
Since the script is already running at the time of the check, the count should be exactly 2.

@masonr
Copy link
Owner

masonr commented May 4, 2017

Yeah, the issue with that is I typically run the script with screen. So it'll count the screen instance and the actual script running so the count will already be at 2 when running the script once. I'll look into finding another way to detect that the script is already running.

@olipayne
Copy link
Contributor Author

olipayne commented May 4, 2017

PR incoming, give me a few mins

@masonr
Copy link
Owner

masonr commented May 4, 2017

Thanks for sorting this one out.

@masonr masonr closed this as completed May 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants