Skip to content

Instantly share code, notes, and snippets.

@GuiSevero
Created October 11, 2018 01:38
Show Gist options
  • Save GuiSevero/ac950d67b0c683dd995e83206b64168c to your computer and use it in GitHub Desktop.
Save GuiSevero/ac950d67b0c683dd995e83206b64168c to your computer and use it in GitHub Desktop.
echo "Patch file controller.sh"
TEMP_FILE=$(mktemp)
echo<<EOF >$(TEMPFILE)
8c8
< JAVA_TOOL=${JRE_HOME}/bin/java
---
> JAVA_TOOL=java
68c68
< ${PORTT_TOOL} 127.0.0.1 8088 500
---
> netstat -plnt | grep :::8088
92c92
< nohup $JAVA_TOOL -server -Xms128m -Xmx1024m -XX:MaxHeapFreeRatio=60 -XX:MinHeapFreeRatio=30 -XX:+UseSerialGC -XX:+HeapDumpOnOutOfMemoryError -Deap.home="${eapHome}" -cp ${eapHome}"/lib/com.tp-link.eap.start-0.0.1-SNAPSHOT.jar:"${eapHome}"/lib/*:"${eapHome}"/external-lib/*" com.tp_link.eap.start.EapMain start > ${eapHome}/logs/startup.log 2>&1 &
---
> nohup $JAVA_TOOL -client -Xms128m -Xmx1024m -XX:MaxHeapFreeRatio=60 -XX:MinHeapFreeRatio=30 -XX:+UseSerialGC -XX:+HeapDumpOnOutOfMemoryError -Deap.home="${eapHome}" -cp ${eapHome}"/lib/com.tp-link.eap.start-0.0.1-SNAPSHOT.jar:"${eapHome}"/lib/*:"${eapHome}"/external-lib/*" com.tp_link.eap.start.EapMain start > ${eapHome}/logs/startup.log 2>&1 &
EOF
mv bin/control.sh bin/control.sh~
patch bin/control.sh~ -i $TEMP_FILE -o bin/control.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment