summarylogtreecommitdiffstats
path: root/teamviewer.install
blob: 9de99b6e9d74b50bf5ec6caf7619e8f3491264c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
_opt_AutoStart=0

post_install() {
  systemctl daemon-reload
  if [ "${_opt_AutoStart}" -eq 0 ]; then
    if ! systemctl -q is-active 'teamviewerd.service'; then
      echo "The Teamviewer daemon must be running for Teamviewer to work."
      echo "Execute 'sudo systemctl enable --now teamviewerd' in a terminal."
    fi
  else
    systemctl enable --now 'teamviewerd.service'
  fi
}

post_upgrade() {
  post_install
}

pre_remove() {
  if [ "${_opt_AutoStart}" -ne 0 ]; then
    systemctl disable --now 'teamviewerd.service'
  fi
}

pre_upgrade() {
  pre_remove
}

post_remove() {
  rm -rf /opt/teamviewer
  systemctl daemon-reload
}

# vim: ts=2 sw=2 et: