summarylogtreecommitdiffstats
path: root/sickrage-git.install
blob: 107c9fcb3296401a1567be2e47136b0506492d6b (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
post_install() {
  systemd-sysusers sickrage.conf
  systemd-tmpfiles --create sickrage.conf
  chown -R sickrage:sickrage /opt/sickrage

  echo "==> Start and enable sickrage.service. Then visit http://localhost:8081/"
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  systemctl stop sickrage.service
}

post_remove() {
  rm -rf /opt/sickrage/app

  echo "==> To delete the configuration files, run as root: rm -rf /opt/sickrage/data"

  # Do not delete the 'sickrage' user automatically. It may still own files.
  # If 'sickrage' is the only user in group 'sickrage', then userdel will also delete the group.
  echo "==> To delete the \"sickrage\" user, run as root: userdel --force sickrage"
}