The problem is solved! There are 2 ways (my system is Sabayon-Linux):
1. Using a script in /lib64/systemd/system-sleep/ folder. I created a kill_n_start.sh script with the contents
#!/bin/shcase $1/$2 inpre/*)# Execute before going to sleeppkill TeamViewersystemctl stop teamviewerd;;post/*)# Execute after wake upsystemctl start teamviewerd;;esac
It started working immediately without rebooting - TeamViewer closes before PC puts itself to sleep and starts when PC leaves sleep mode.
2. The same can be achieved with a very similar script in /usr/lib/pm-utils/sleep.d/. Described in detail here: https://askubuntu.com/questions/226278/run-script-on-wakeup
Have you heard?! On October 21, we’re hosting TeamViewer Rise—and we want to see you there! The digital event dedicated to IT experts. Join us to hear industry leaders as they share demos, roadmaps, and real-world strategies for delivering better IT. Take part in our first annual event for Proven, ready-to-deploy…