I'm starting a bash script from Kotlin, but the bash script stops running as soon as the Kotlin application exits.
val pr = ProcessBuilder("/home/vlad/liq", script, input).start()
Where script is a liquidsoap script and input is a parameter that's being passed into the script
Typically, it'll run something like the following:
./liq blah.liq http://somedomain.com:8090
liq then executes a liquidsoap script which is the first param and the second param is then used as a param for the liquidsoap script.
#!/bin/bash
nohup /usr/bin/liquidsoap $1 -- $2 > /dev/null 2>&1 &
# this causes syntax error
# nohup (/usr/bin/liquidsoap $1 -- $2 > /dev/null 2>&1 &)
This Kotlin application is run via java -jar dashboard.jar, while the application is running, that liquidsoap script is running, as soon as i exit the Kotlin application with Ctrl + C, that liquidsoap script also stops.
I was under the impression that nohup + & would spawn a new console thus keeping the script running even after the Kotlin application exits, but it's not.
Any ideas on how to keep the script running even after my Kotlin application exits ?
(/usr/bin/liquidsoap $1 -- $2 > /dev/null 2>&1 &)/usr/bin/liquidsoap', i've' tried moving the ampersand out of the brackets too, still says syntax error.nohup/usr/bin/liquidsoap $1 -- $2where $1 is .liq script and $2 is a URL