I am new to Linux environment and working on writing scripts to start and stop few services(nodejs app bundled into executables using 'pkg' module). I want to stop processes by name and found 'killall' command. I tried this command individuaaly and inside bash script. Problem I am facing is, after executing kill command, control does not comeback to terminal and i need to use ctrl+c to get terminal back.

Here is script i tried:

```
#!/bin/bash
# Run with command : chmod +x /root/myApp/stopserv.sh && /root/myApp/stopserv.sh

echo "Stopping Service1"
nohup killall  Service1 &>/dev/null &
echo "Stopping Service2"
nohup killall  Service2 &>/dev/null &
echo "Stopping Service3"
nohup killall  Service3 &>/dev/null &
echo "Stopping Service4"
nohup killall  Service4 &>/dev/null &

```

And when i run this script, I get response on terminal like below:

```
root@Phantom-E03E:~/myApp# chmod +x /root/myApp/stopserv.sh && /root/myApp/stopserv.sh
Stopping Service1
Stopping Service2
Stopping Service3
Stopping Service4
root@Phantom-E03E:~/myApp# /root/myApp/startserv.sh: line 17: 29535 Terminated    nohup ./Service1 &> /dev/null
/root/myApp/startserv.sh: line 11: 29533 Terminated              nohup ./Service2-linux &> /dev/null
/root/myApp/startserv.sh: line 14: 29534 Terminated              nohup ./Service3-linux &> /dev/null
/root/myApp/startserv.sh: line 8: 29527 Terminated              nohup ./Service4-linux &> /dev/null

```

I want to check:

1. Is there any other recommended way to stop executables in linux by name?
2. How to i get control back to terminal "root@Phantom-E03E:~/myApp#" after running script?

Thanks,
Pooja