From 825899b2985b623fc84a8783c0d7db3958ef1c24 Mon Sep 17 00:00:00 2001 From: absurdo Date: Sun, 26 Nov 2023 01:06:36 +0100 Subject: [PATCH] Added new functions to Linux functions --- vendor/phangoapp/leviathanutils/src/Linux.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vendor/phangoapp/leviathanutils/src/Linux.php b/vendor/phangoapp/leviathanutils/src/Linux.php index 2288de9..39e9478 100644 --- a/vendor/phangoapp/leviathanutils/src/Linux.php +++ b/vendor/phangoapp/leviathanutils/src/Linux.php @@ -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];