wait a second between stop and start in the restart command. This avoid
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 28 May 2009 08:36:01 +0000 (08:36 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 28 May 2009 08:36:01 +0000 (08:36 +0000)
the case when the OS does not give yet the port address free and bind failed:

08:27:51-28/05 pazpar2 [log] Pazpar2 1.1.0 started
08:27:51-28/05 pazpar2 [log] HTTP listener 9005
08:27:51-28/05 pazpar2 [fatal] bind [Address already in use]
08:27:51-28/05 pazpar2 [log] Received SIGTERM from child 14128

src/pazpar2.sh

index 84985ca..8debb42 100755 (executable)
@@ -28,6 +28,7 @@ case "$command" in
 
        restart)
                $0 stop
+               sleep 1         # let the OS give the port address free
                $0 start "$@"
                ;;