I'm trying to execute the command:
ssh nvidia@ubuntu-ip-address "/opt/ads2/arm-linux64/bin/ads2 svcd &"
This works so far except that it hangs in the remote terminal when "/opt/ads2/arm-linux64/bin/ads2 svcd&"
is executed, unless i enter ctrl+c (see image below).
So I'm looking for a command that, after executing the "/opt/ads2/arm-linux64/bin/ads2 svcd &"
command, exits from the remote terminal and continue executing the local bash script.
Below is the bash script i'm working on
#!/usr/bin/env bash
echo "Welcome to ADS2 Session Start..."
while true
do
echo "Starting service Daemon on the targert"
echo "Enter the ip-address of the target"
read x
if [ -z "$x" ]
then
echo "ip-address is empty"
else
echo "Connecting with target..."
if [[ $x =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ || $x =~ ^fdt-c-agx-[0-9][0-
9][0-9][0-9]$ ]]
then
ssh nvidia@"$x" "/opt/ads2/arm-linux64/bin/ads2 svcd &"; exit 0
if ! ssh nvidia@"$x"
then
echo -e "\033[31mconnection failed\e[0m"
else
echo -e "\033[32m connection succeded\e[0m"
break
fi
else
"Make sure the io address in the coorect form"
fi
fi
done
/opt/ads2/arm-linux64/bin/ads2 svcd &; exit 0
.nvidia 12040 0.2 0.0 39700 23872 ? Ssl 12:48 0:00 /opt/ads2/arm-linux64/bin/ads2svcd
. However, still hangs on the local and exits everything when i press ctrl+c. which i don't want, because there is a rest-code that must be executed