Subject: Re: Feature proposal - over-quota script execution
From: analoq
Date: Sun, 21 Jun 2020 16:45:42 +0000
That does sound cleaner given that the implementation is due to the program structure and my limited knowledge of it not exactly perfect.

Are these exit codes already implemented, and how does one restart the download after megatools was 'over quota' terminated? Simply restarting a download after 'ctrl+c' terminating it causes the download to start from zero.


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, June 21, 2020 6:30 PM, Ondřej Jirman <megatools@megous.com> wrote:

> Hi,
>
> On Sun, Jun 21, 2020 at 04:01:54PM +0000, analoq wrote:
>
> > Hi,
> > Is there interest in a feature that allows the user to specify a script that
> > gets executed whenever an 'Over quota' error is encountered? I am using this
> > for a while now and it is quite handy.
> > The way my implementation currently works is: megatools dl --exec-on-quota
> > "path/to/script.sh" ....
> > https://gitlab.com/analoq/megatools
>
> I think it's more usual for programs to return different statuses per error
> type, and this allows scripts to use the exit status in conditional code.
>
> regards,
> o.