Add uptime in server log when aborting server
Change-Id: I0b07aa2ed6b179395f4e5e3a029775ea5b1d09c7
diff --git a/tools/jack b/tools/jack
index 106e653..35591c2 100755
--- a/tools/jack
+++ b/tools/jack
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# v 1.1-a11-log-pl1
+# v 1.1-a11-log-pl2
#
set -o nounset
umask 077
@@ -92,7 +92,7 @@
touch "$JACK_CLI" "$JACK_EXIT"
# Try to cleanup if interrupted
-abort () { kill -9 $PID_OUT $PID_ERR 2>>$SERVER_LOG; wait $PID_OUT $PID_ERR 2>>$SERVER_LOG; exit 255; }
+abort () { echo $(uptime) >>$SERVER_LOG; kill -9 $PID_OUT $PID_ERR 2>>$SERVER_LOG; wait $PID_OUT $PID_ERR 2>>$SERVER_LOG; exit 255; }
trap 'abort' SIGHUP SIGINT SIGQUIT SIGTERM ERR
# Redirect output and error