Permalink
Browse files

Updated keepServerAlive target so that if the kill file already exist…

…s when the server is started up, the file is deleted. Otherwise the server will quit straight away.
  • Loading branch information...
1 parent 8573419 commit 1f25b6325611b9e86a1c1510758121595a2eb737 @pledbrook pledbrook committed Jul 27, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 scripts/_GrailsRun.groovy
@@ -220,6 +220,11 @@ target(watchContext: "Watches the WEB-INF/classes directory for changes and rest
target(keepServerAlive: "Idles the script, ensuring that the server stays running.") {
def keepRunning = true
def killFile = new File("${basedir}/.kill-run-app")
+ if (killFile.exists()) {
+ grailsConsole.warning ".kill-run-app file exists - perhaps a previous server stop didn't work?. Deleting and continuing anyway."
+ killFile.delete()
+ }
+
while (keepRunning) {
sleep(recompileFrequency * 1000)

0 comments on commit 1f25b63

Please sign in to comment.