Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added support for pid-file-path. Ticket #445

  • Loading branch information...
commit f0cff4a9b2dcd6391efd05efb835a388be217e8c 1 parent 1052fbe
authored
5  framework/src/play/src/main/scala/play/core/server/NettyServer.scala
@@ -150,8 +150,9 @@ object NettyServer {
150 150
 
151 151
     // Manage RUNNING_PID file
152 152
     java.lang.management.ManagementFactory.getRuntimeMXBean.getName.split('@').headOption.map { pid =>
153  
-      val pidFile = new File(applicationPath, "RUNNING_PID")
154  
-
  153
+      val pidPath = Option(System.getProperty("pidfile.path")).getOrElse(applicationPath.getAbsolutePath())
  154
+      val pidFile = new File(pidPath, "RUNNING_PID")
  155
+      
155 156
       if (pidFile.exists) {
156 157
         println("This application is already running (Or delete the RUNNING_PID file).")
157 158
         System.exit(-1)

0 notes on commit f0cff4a

Please sign in to comment.
Something went wrong with that request. Please try again.