This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# (Re)spawn the application | |
function spawn () { | |
local ps_name=$1 | |
local spawn_cmd=$2 | |
local pids=`ps -C $ps_name -o pid=` | |
if [ ${#pids} -ne 0 ] | |
then | |
echo "Sending TERM to $pids..." |