-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.php
More file actions
43 lines (37 loc) · 1.32 KB
/
Copy pathupdate.php
File metadata and controls
43 lines (37 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
include ("header.php");
include ("pass.php");
$walletDir = "/home/stakebox/wallets/".$currentWallet;
?>
<div style="padding: 5px 30px 0px;">
<div class="row">
<div class="col-lg-2">
<form action="update" method="POST"><input type="hidden">
<div class="input-group">
<button class='btn btn-default' type="submit" name="status" value="webui">Update WebUI</button>
</div><!-- /input-group -->
</form>
</div><!-- /.col-lg-2 -->
<div class="col-lg-2">
<form action="update" method="POST"><input type="hidden">
<div class="input-group">
<button class='btn btn-default' type="submit" name="status" value="wallet">Update Wallet Version</button>
</div><!-- /input-group -->
</form>
</div><!-- /.col-lg-2 -->
</div><!-- /.row -->
<?php
$status = $_POST["status"];
if ($status == "webui"){
exec("cd /var/www/html/webui && git pull && chmod -R g+rwx /var/www/html/webui");
print '<h2>You have updated the UI</h2>';
}
if ($status == "wallet"){
chdir($walletDir);
exec("git pull");
print '<h2>You have updated the current wallet. Reboot now in order to use the new version.</h2>';
}
?>
</div>
</div>
<?php include ("footer.php"); ?>