Appium Server in Mac(slave machine) through execute shell

Please suggest an approach to overcome this blockage…

My setup involves master slave configuration where Appium server is located in MACosx (slave machine) and all the tests are in the same machine
I have written shell script for appium to run in background but if i invoke the script through terminal it works fine and even if I close the terminal the server still runs in background (that’s what I needed )
nohup ./ >/dev/null &
But, If I invoke appium script through Jenkins in execute shell section it runs and kills the background process with in no time because of that my Gradle tests are failing I want appium to be in background.
nohup ./ >/dev/null &
Even I tried with ssh myname@serverIP nohup ./ >>/dev/null & # no luck

I tried to see log result it displaying nothing nohup ./ >>$workspace/script.log &

Why you do not start appium in code just like “appium --log-level error --port 4725 --session-override” ?

we have similar approach (Jenkins and macMini as slave. TestNG and Maven.). we use:
1 - appium installed via npm
2 - appium starting before tests starting in “beforeSuite” section of testNG
3 - to make it better we kill appium session for sure before starting tests in same “beforeSuite” as process by port number

Thanks for quick reply.: :slight_smile:

Ya I thought the same way invoking Appium server through code I’am aware of that. But I am not a tester/developer as a build Engineer I just tried to invoke Appium server on windows platform.

I completed batch file which will keeps appium server in background and runs the gradle tests It worked pretty well for windows without hanging the job.

But, I want it to work for linux/mac platform as well (bit curiosity).