mirror of
https://github.com/unraid/webgui.git
synced 2026-04-22 18:19:14 -05:00
Use 'emcmd' that POSTs to /update endpoint.
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/php
|
||||
<?PHP
|
||||
require_once "/usr/local/emhttp/webGui/include/publish.php";
|
||||
function emhttp_command($cmd)
|
||||
{
|
||||
$var = parse_ini_file("/var/local/emhttp/var.ini");
|
||||
$cmd .= "&csrf_token={$var['csrf_token']}";
|
||||
return curl_socket("/var/run/emhttpd.socket", "http://localhost/update", $cmd);
|
||||
}
|
||||
$result = emhttp_command($argv[1]);
|
||||
if ($result === "") exit(0);
|
||||
echo "$result".PHP_EOL;
|
||||
exit(1);
|
||||
?>
|
||||
Reference in New Issue
Block a user