Author Topic: script to restart teamviewer5?  (Read 6863 times)


  • Newbie
  • *
  • Posts: 2
script to restart teamviewer5?
« on: January 29, 2011, 08:25:45 AM »
hi all
i have been trying to write a small script to restart teamviewer if it stop
this script seem to work (when i use crontab)  in that i updates the log but does not start teamviewer but if i run the script in terminal it works.
 so can some tell me what i have to do to get it to work

#Script to check if the teamviewer are running.
#Script is written by joesto1
process=`ps auxwww | grep teamviewer | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then
echo "Couldn't find teamviewer running Restarting teamviewer "`date` >>/var/cccamlog/team.check
else echo "teamviewer is still OK! "`date` >>/var/cccamlog/team.check

i am very new to linux

ps i use ubuntu 10.04