mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Can update server
This commit is contained in:
parent
c048e4eeaf
commit
0af1adcfb8
3 changed files with 19 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<Version>1.0.2.66</Version>
|
||||
<Version>1.0.2.67</Version>
|
||||
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -36,13 +36,23 @@
|
|||
<div class="input-group">
|
||||
<input asp-for="DNSDomain" class="form-control" />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-primary" name="command" value="changedomain" title="Change domain">
|
||||
<button name="command" type="submit" class="btn btn-primary" value="changedomain" title="Change domain">
|
||||
<span class="fa fa-check"></span> Confirm
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<span asp-validation-for="DNSDomain" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<h5>Update</h5>
|
||||
<span>Click here to update your server</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<button name="command" type="submit" class="btn btn-primary" value="update">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue