diff options
author | Anton Tananaev <anton@traccar.org> | 2024-06-01 07:34:20 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-06-01 07:34:20 -0700 |
commit | 13b7eff68004fdc03ed4f754d65fcda1bf4f2231 (patch) | |
tree | 624efc15cef98ec8aa3a642bbae8234fecd9ecf7 | |
parent | a75b3d82cda411c0a431c4fbfcaa4da3feea1131 (diff) | |
download | trackermap-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.java | 7 |
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); + } + } |