Teamviewer Linux has the annoying property of installing a permanently running daemon. This not only consumes resources but also presents a security risk. You can disable the daemon startup, however then the teamviewer client does not work anymore. The following script handles things automatically:
#!/bin/sh echo starting teamviewer daemon sudo teamviewer --daemon enable teamviewer & wait $! echo teamviewer finished sudo teamviewer --daemon disable echo stopped and disabled teamviewer daemon