Gemini bridge control

This commit is contained in:
2023-10-06 20:01:24 -04:00
parent 09b2f7a24f
commit 7c811a546e
7 changed files with 264 additions and 24 deletions

View File

@@ -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."\"");
}
?>