This is an automated email from the ASF dual-hosted git repository.

nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-webui.git


The following commit(s) were added to refs/heads/main by this push:
     new 58eec843 [Impovement] Support start.sh script deployment in daemon 
(#380)
58eec843 is described below

commit 58eec843abac90e9cd7a45a4bf2e08cd2363e4bd
Author: yangyang zhong <[email protected]>
AuthorDate: Fri Jun 14 01:03:29 2024 +0800

    [Impovement] Support start.sh script deployment in daemon (#380)
---
 paimon-web-server/src/main/bin/start.sh | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/paimon-web-server/src/main/bin/start.sh 
b/paimon-web-server/src/main/bin/start.sh
index 3b28380a..cabcf6a8 100644
--- a/paimon-web-server/src/main/bin/start.sh
+++ b/paimon-web-server/src/main/bin/start.sh
@@ -44,6 +44,28 @@ if [ -z "$ACTION_JAR_PATH" ]; then
     echo "ACTION_JAR_PATH is null, CDC cannot be used normally!"
 fi
 
-$JAVA_HOME/bin/java $JAVA_OPTS \
-  -cp "$PAIMON_UI_HOME/conf":"$PAIMON_UI_HOME/libs/*" \
-   org.apache.paimon.web.server.PaimonWebServerApplication
\ No newline at end of file
+DAEMON=false
+while [[ $# -gt 0 ]]; do
+  case "$1" in
+    --daemon)
+      DAEMON=true
+      ;;
+    *)
+      echo "Unsupported parameter: $1"
+      exit 1
+      ;;
+  esac
+  shift
+done
+
+if [ "$DAEMON" = true ]; then
+  nohup $JAVA_HOME/bin/java $JAVA_OPTS \
+    -cp "$PAIMON_UI_HOME/conf:$PAIMON_UI_HOME/libs/*" \
+    org.apache.paimon.web.server.PaimonWebServerApplication \
+    > /dev/null 2>&1 &
+  echo "Paimon Web Server started in daemon."
+else
+  $JAVA_HOME/bin/java $JAVA_OPTS \
+    -cp "$PAIMON_UI_HOME/conf:$PAIMON_UI_HOME/libs/*" \
+    org.apache.paimon.web.server.PaimonWebServerApplication
+fi
\ No newline at end of file

Reply via email to