From 13b7eff68004fdc03ed4f754d65fcda1bf4f2231 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 1 Jun 2024 07:34:20 -0700 Subject: Option to reboot server --- src/main/java/org/traccar/api/resource/ServerResource.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/main/java/org/traccar/api/resource/ServerResource.java b/src/main/java/org/traccar/api/resource/ServerResource.java index 2a72d2773..eb10ac763 100644 --- a/src/main/java/org/traccar/api/resource/ServerResource.java +++ b/src/main/java/org/traccar/api/resource/ServerResource.java @@ -161,4 +161,11 @@ public class ServerResource extends BaseResource { return cacheManager.toString(); } + @Path("reboot") + @POST + public void reboot() throws StorageException { + permissionsService.checkAdmin(getUserId()); + System.exit(130); + } + } -- cgit v1.2.3