Gemini bridge control
This commit is contained in:
@@ -37,4 +37,16 @@ function returnSuccess($success, $refreshToken = ""){
|
||||
));
|
||||
exit();
|
||||
}
|
||||
|
||||
function getUsers(){
|
||||
return explode("\n", shell_exec("cut -d: -f1 /etc/passwd"));
|
||||
}
|
||||
|
||||
function userExists($user){
|
||||
return in_array($user, getUsers());
|
||||
}
|
||||
|
||||
function geminiProxy($user, $action){
|
||||
return shell_exec("/usr/bin/sudo /etc/ttyserver/bin/toggleProxy ".$action." \"".$user."\"");
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user