summarylogtreecommitdiffstats
path: root/kodi-addon-pulsar.install
blob: 689f2b1e6fc6392feb9e94291f384a93d4fb0e16 (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
classname=plugin.video.pulsar
usr=420
home=/var/lib/kodi/.kodi/addons
repo=$home/repository.pulsar
addonpath=$home/${classname}

_chown() {
  chmod 755 $(find $addonpath -type d)
  chmod 644 $(find $addonpath -type f)
  chown -R $usr:$usr $home $addonpath
}

## arg 1:  the new package version
post_install() {
  getent passwd $usr &> /dev/null || useradd -r -d $home -s /bin/bash $usr
  _chown

}

post_upgrade() {
  _chown
}

## arg 1:  the old package version
post_remove() {
  rm -r $addonpath $repo
  return 0
}

# vim:set ts=2 sw=2 et: