Fixes in functions
This commit is contained in:
parent
825899b298
commit
a05bb1317d
1 changed files with 7 additions and 2 deletions
|
|
@ -177,7 +177,7 @@ class Linux {
|
|||
|
||||
}
|
||||
|
||||
static public function restart_service($service) {
|
||||
static public function systemd_service($action, $service) {
|
||||
|
||||
$distro=Linux::get_linux_distro();
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ class Linux {
|
|||
|
||||
}
|
||||
|
||||
Linux::shell_command(["sudo ".$service[$distro]]);
|
||||
Linux::shell_command(["sudo systemctl ${action}".$service[$distro]]);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -209,6 +209,11 @@ class Linux {
|
|||
|
||||
}
|
||||
|
||||
static public function sed($str_search, $str_replace, $file_to_replace) {
|
||||
|
||||
Linux::exec("sudo sed -i 's/${str_search}/${str_replace}/g' ${file_to_replace}");
|
||||
|
||||
}
|
||||
|
||||
|
||||
static public function json_log($message, $error=0, $status=0, $progress=0, $no_progress=0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue