Skip to content

Commit

Permalink
Updated keepServerAlive target so that if the kill file already exist…
Browse files Browse the repository at this point in the history
…s when the server is started up, the file is deleted. Otherwise the server will quit straight away.
  • Loading branch information
pledbrook committed Jul 28, 2011
1 parent 8573419 commit 1f25b63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/_GrailsRun.groovy
Expand Up @@ -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)

Expand Down

0 comments on commit 1f25b63

Please sign in to comment.