2007-10-26 22:44:33 +00:00
|
|
|
#!/usr/bin/awk -f
|
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
BEGIN {
|
|
|
|
port = 3001
|
|
|
|
listener = "/inet/tcp/" port "/0/0"
|
|
|
|
quit = "no"
|
|
|
|
while (match(quit,"no")) {
|
|
|
|
while (match(quit,"no") && (listener |& getline) > 0) {
|
|
|
|
if (match($0,"restart")) {
|
|
|
|
print "restarting bootstrap process" |& listener
|
|
|
|
quit="yes"
|
|
|
|
system("touch /restart")
|
2008-04-09 20:22:46 +00:00
|
|
|
system("killall sleep")
|
2007-10-26 22:44:33 +00:00
|
|
|
close(listener)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
close(listener)
|
|
|
|
}
|
|
|
|
}
|