mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-07 01:07:10 +00:00
@@ -325,8 +325,12 @@ async function run_shell_command(ip: string, command: string): Promise<RequestRe
|
||||
return await request_display(ip, '/shellCommand', options);
|
||||
}
|
||||
|
||||
export async function shutdown(ip: string): Promise<RequestResponse> {
|
||||
return await run_shell_command(ip, 'xfce4-session-logout --halt');
|
||||
export async function shutdown(ip: string): Promise<boolean> {
|
||||
const command = 'xfce4-session-logout --halt';
|
||||
const raw_response = await run_shell_command(ip, command);
|
||||
if (!raw_response.ok) return false;
|
||||
if (handle_shell_error(ip, raw_response, command, true)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export async function startup(mac: string): Promise<RequestResponse> {
|
||||
|
||||
Reference in New Issue
Block a user