Can update server

This commit is contained in:
nicolas.dorier
2018-07-24 22:10:37 +09:00
parent c048e4eeaf
commit 0af1adcfb8
3 changed files with 19 additions and 2 deletions

View File

@@ -225,6 +225,13 @@ namespace BTCPayServer.Controllers
builder.Query = null;
StatusMessage = $"Domain name changing... the server will restart, please use \"{builder.Uri.AbsoluteUri}\"";
}
else if (command == "update")
{
var error = RunSSH(vm, command, $"sudo bash -c '. /etc/profile.d/btcpay-env.sh && btcpay-update.sh'");
if (error != null)
return error;
StatusMessage = $"The server might restart soon if an update is available...";
}
else
{
return NotFound();