Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added script to autorestart javarepl.

  • Loading branch information...
commit 598b15bf983160b6b4b5e60412067c25eee3ee2b 1 parent b5d0b6a
@albertlatacz authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 bin/restart-javarepl.sh
View
12 bin/restart-javarepl.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+# */5 * * * * /home/ubuntu/restart-javarepl.sh
+
+PID=`ps -eo 'tty pid args' | grep 'javarepl.jar' | grep -v grep | tr -s ' ' | cut -f2 -d ' '`
+
+if [ -z "$PID" ]
+then
+ ./ec2-install.sh
+ echo "Started Process at `date`"
+else
+ echo "Process is already Running with PIS=$PID"
+fi
Please sign in to comment.
Something went wrong with that request. Please try again.