mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Allow JAR update/restart on all linux platforms (#651)
* Added linux support * Changed to just check linux
This commit is contained in:
@@ -113,7 +113,7 @@ public class RequestHandler {
|
||||
logger.info("New .jar uploaded successfully.");
|
||||
|
||||
if (file != null) {
|
||||
if (Platform.isRaspberryPi()) {
|
||||
if (Platform.isLinux()) {
|
||||
try {
|
||||
Path filePath =
|
||||
Paths.get(ProgramDirectoryUtilities.getProgramDirectory(), "photonvision.jar");
|
||||
@@ -140,7 +140,7 @@ public class RequestHandler {
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.error("Hot .jar replace currently only supported on Raspberry pi. Ignoring.");
|
||||
logger.error("Hot .jar replace currently only supported on Linux. Ignoring.");
|
||||
ctx.status(500);
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ public class RequestHandler {
|
||||
* an equivalent.
|
||||
*/
|
||||
public static void restartProgramInternal() {
|
||||
if (Platform.isRaspberryPi()) {
|
||||
if (Platform.isLinux()) {
|
||||
try {
|
||||
new ShellExec().executeBashCommand("systemctl restart photonvision.service");
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user