Wanted to contibute back my own local changes, may need some further refinement.
This version will automatically use an existing lbrynet instance if detected, meaning that it can use the desktop client as a backend and can be used to trigger the desired behavior without installing or downloading anything other than the script.
In addition the script now has the ability to launch lbrynet from its own directory if no existing instance is found, making it no longer require the .service although you could make a recurring systemd service to start the script if you prefer it over cron.
I might add in some checks to see if lbrynet is managed by systemd and start it that way if that is the case.
I see no reason this cannot be merged in its current state.
Wanted to contibute back my own local changes, may need some further refinement. This version will automatically use an existing lbrynet instance if detected, meaning that it can use the desktop client as a backend and can be used to trigger the desired behavior without installing or downloading anything other than the script. In addition the script now has the ability to launch lbrynet from its own directory if no existing instance is found, making it no longer require the .service although you could make a recurring systemd service to start the script if you prefer it over cron.