summarylogtreecommitdiffstats
path: root/sickchill-git.install
blob: 9faefc9e69ab735e3eff036b0fca60753151e17f (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
post_install() {
  systemd-sysusers sickchill.conf
  systemd-tmpfiles --create sickchill.conf

  chown -R sickchill:sickchill /opt/sickchill/app
  chown sickchill:sickchill /opt/sickchill/data

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

post_upgrade() {
  post_install "$1"
}

pre_remove() {
  echo "==> Stopping sickchill.service..."
  systemctl stop sickchill.service
}

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

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

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