0

I made a script to close teamviewer and reopen it every hour. I am now testing it every 5 seconds, but the loop is simply not working. The script is running correctly, but one time only.

I need your help.

#!/bin/bash
while :

do

echo "hello"

killall -9 TeamViewer.exe &> sample.s

sleep 1

killall -9  teamviwerd &> sample.s

sleep 5

teamviewer &> sample.s

sleep 5

done
amc
  • 7,292
omar
  • 1

1 Answers1

0

Whatever is written in that loop....as long as there are no terminal errors the script should loop.

It seems though that the "done" on the last line is not executed. In that case you probably forgot to add a LF (i.e. Enter) to the last line.

thom
  • 7,742