Added new functions to Linux functions

This commit is contained in:
absurdo 2023-11-26 01:06:36 +01:00
parent 44123dff82
commit 825899b298

View file

@ -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];