Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videolooper starting too fast before wifi network #15

Open
darkvador72 opened this issue Mar 14, 2016 · 1 comment
Open

Videolooper starting too fast before wifi network #15

darkvador72 opened this issue Mar 14, 2016 · 1 comment

Comments

@darkvador72
Copy link

Hi,

When using Video looper to connect to a SMB share (on Windows) using wifi connection, the application Video Looper is starting before SMB mount completion.

Is there a way to check that there are files in the target directory and wait before starting the app or to restart the app using a cron entry ?

Thank you for yoru help
Best Regards

@rmcaninch
Copy link

I scripted an rsync to copy the files off the SMB share and onto the SD card nightly. So they would easily be available.

Don't have time to test this right now, but in startvideos.sh you could try adding something like this after line 14:

# Set bailout to avoid an infinite loop if the FILES share never is readable.
bailout=0
while [! -r $FILES && -x $FILES  ];
do
    sleep 2
    bailout+=2
    if [[ ! "$bailout" -gt 200 ]]; then
        exit 0
done

The idea is to test the FILES directory is readable and executable then sleep 2 seconds and try again. And exit if it hits 200 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants