■ ■ ■ ■ ■ ■
commons-bootstrap/src/main/java/io/onedev/commons/bootstrap/Bootstrap.java
| skipped 332 lines |
333 | 333 | | return new File(installDir, "boot"); |
334 | 334 | | } |
335 | 335 | | |
336 | | - | public static File getStatusDir() { |
337 | | - | return new File(installDir, "status"); |
338 | | - | } |
339 | | - | |
340 | | - | public static boolean isServerRunning(File installDir) { |
341 | | - | // status directory may contain multiple pid files, for instance, |
342 | | - | // appname.pid, appname_backup.pid, etc. We only check for appname.pid |
343 | | - | // here and assumes that appname does not contain underscore |
344 | | - | for (File file: new File(installDir, "status").listFiles()) { |
345 | | - | if (file.getName().endsWith(".pid") && !file.getName().contains("_")) |
346 | | - | return true; |
347 | | - | } |
348 | | - | return false; |
349 | | - | } |
350 | | - | |
351 | 336 | | public static File getLibDir() { |
352 | 337 | | return new File(installDir, "lib"); |
353 | 338 | | } |
| skipped 91 lines |