aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-06-01 07:34:20 -0700
committerAnton Tananaev <anton@traccar.org>2024-06-01 07:34:20 -0700
commit13b7eff68004fdc03ed4f754d65fcda1bf4f2231 (patch)
tree624efc15cef98ec8aa3a642bbae8234fecd9ecf7
parenta75b3d82cda411c0a431c4fbfcaa4da3feea1131 (diff)
downloadtrackermap-server-13b7eff68004fdc03ed4f754d65fcda1bf4f2231.tar.gz
trackermap-server-13b7eff68004fdc03ed4f754d65fcda1bf4f2231.tar.bz2
trackermap-server-13b7eff68004fdc03ed4f754d65fcda1bf4f2231.zip
Option to reboot server
-rw-r--r--src/main/java/org/traccar/api/resource/ServerResource.java7
1 files changed, 7 insertions, 0 deletions
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);
+ }
+
}