#! /bin/bash
if pgrep synergys
then
   echo "Killing server"
   #sudo killall synergys
   killall synergys
   sleep 1
   killall -9 synergys
else
   if pgrep synergyc
   then
       echo "Killing client"
       killall synergyc
       sleep 1
       killall -9 synergyc
       exit 0
   else
       echo "Cannot find synergy"
   fi
fi
#sudo service synergy stop

#! /bin/bash

THING="monster"


function syn_kill {
   echo -n "Killing $THING... "
   #sudo killall synergys
   killall $THING && echo "Dead"
   sleep 1
   killall -9 $THING >> /dev/null 2>&1 && echo "Dead"
   exit 0
}
if pgrep synergys
then
    THING="synergys"
    syn_kill
else
   if pgrep synergyc
   then
      THING="synergyc"
      syn_kill
   else
       echo "Cannot find synergy"
   fi
fi
#sudo service synergy stop

Make a function of killing synergy types.
Make a function of killing synergy types.
