If a user ctrl+cs during install, always move LS.php back

Uses defer and listens for SIGTERM As well as doing some other nice cleanup.

This will also no longer leave backup files in the mw directory which is nice :)

Bug: T291529

Merge request reports

Loading