[mythtv-users] optimize before shut down

Daryl McDonald darylangela at gmail.com
Tue Apr 23 17:36:44 UTC 2019

On Tue, Apr 23, 2019, 13:27 Peter Bennett <pb.mythtv at gmail.com> wrote:

> What I do is as follows:
> I have a script that gets run as the pre-shutdown check command. In
> there I check date and time and decide whether certain things need to be
> done (backup, optimize, other things). If it decides that, for example,
> dailyrun.sh needs to run, it returns 1 to the check and starts up
> dailyrun.sh. It continues to return 1 to the check until dailyrun.sh is
> finished, then returns 0 which allows the shutdown. I keep files in a
> directory with dates so that it knows if something is already run for
> the day and does not run it again.
> See
> https://github.com/bennettpeter/mythscripts/blob/master/install/opt/mythtv/bin/mythshutdown.sh
> for my script. It does a lot more than you are looking for, but may give
> you some ideas. That script runs "dailyrun.sh" once a day, the first
> time a shutdown occurs. I am not sure how you will know the last time a
> shutdown occurs for the day, but running your optimize at the first
> shutdown of the day should be just as good.
> Peter
> _________________________________________

Yes Peter I think this is more of what I'm looking for, my question now is,
since I already have a pre shutdown check working (to check if I'm logged
in or not) how can these two be combined or will yours do what mine is
already doing and thereby repaceable?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190423/dceca83f/attachment.html>

More information about the mythtv-users mailing list