Added new functions to Linux functions
This commit is contained in:
parent
44123dff82
commit
825899b298
1 changed files with 18 additions and 0 deletions
18
vendor/phangoapp/leviathanutils/src/Linux.php
vendored
18
vendor/phangoapp/leviathanutils/src/Linux.php
vendored
|
|
@ -193,6 +193,24 @@ class Linux {
|
|||
|
||||
}
|
||||
|
||||
static public function exec($executable) {
|
||||
|
||||
$distro=Linux::get_linux_distro();
|
||||
|
||||
if(!isset($executable[$distro])) {
|
||||
|
||||
echo "Sorry, you don't have a exec for this distro\n";
|
||||
|
||||
exit(1);
|
||||
|
||||
}
|
||||
|
||||
Linux::shell_command([$executable[$distro]]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static public function json_log($message, $error=0, $status=0, $progress=0, $no_progress=0) {
|
||||
|
||||
$log=["error" => $error, "status" => $status, "progress" => $progress, "no_progress" => $no_progress, "message" => $message];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue