VZDump->new() dies when a tmpdir or dumpdir is configured
but does not exist. At this point the error is not being
reported via email.
This also moves the instantiation of VZDump into the worker
since new() can now call sendmail() on error.
Additionally rather than only showing a single error if both
tmpdir and dumpdir don't exist, both are included in the
message.
* do not unlink $pidfile inside stop_running_backups to avoid race conditions
* use pve UPID to save pid (see PVE::Tools::upid_decode)
* allow to pass -stop parameter to nomal backup job
* simple return 'OK' instead of calling exit() inside API call.
* rename stop_all_backups to stop_running_backups
This fix include a new function of vzdump.
Now you can call vzdump -stop and the backup will be aborted.
Also if the pve-manager init script stop the process, vzdump -stop will called.
Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>