A AndroidMadhu Active Member Licensed User Sep 26, 2024 #1 Hi, I am running the below command using nohup as below: B4X: Copy nohup ./connect-standalone.sh /opt/oracle/kafka/config/connect-standalone.properties & The shell running at the background as long as as the server restart. But If I want to call the script using b4j and try to run the script forever even if I close the b4j application, then how to do that? Thanks
Hi, I am running the below command using nohup as below: B4X: Copy nohup ./connect-standalone.sh /opt/oracle/kafka/config/connect-standalone.properties & The shell running at the background as long as as the server restart. But If I want to call the script using b4j and try to run the script forever even if I close the b4j application, then how to do that? Thanks
Erel B4X founder Staff member Licensed User Longtime User Sep 27, 2024 #2 What happens if you run this command with Shell? Upvote 0
A AndroidMadhu Active Member Licensed User Sep 28, 2024 #3 Erel said: What happens if you run this command with Shell? Click to expand... It is running as expected If I run the script manually. As long as the servers restarts the scripts keep on running. I want to run the script using b4j. Expectation is the script will run as a service in linux. Is that possible using b4j. Thanks Upvote 0
Erel said: What happens if you run this command with Shell? Click to expand... It is running as expected If I run the script manually. As long as the servers restarts the scripts keep on running. I want to run the script using b4j. Expectation is the script will run as a service in linux. Is that possible using b4j. Thanks
aminoacid Well-Known Member Licensed User Longtime User Sep 28, 2024 #4 I think what @Erel is asking you, is to try running your shell script using the B4J jShell Library as follows: B4X: Copy Private shl As Shell shl.Initialize("shl","nohup",Array As String("./connect-standalone.sh", "/opt/oracle/kafka/config/connect-standalone.properties", "&")) shl.Run(-1) Upvote 0
I think what @Erel is asking you, is to try running your shell script using the B4J jShell Library as follows: B4X: Copy Private shl As Shell shl.Initialize("shl","nohup",Array As String("./connect-standalone.sh", "/opt/oracle/kafka/config/connect-standalone.properties", "&")) shl.Run(-1)