updated on Tue Jan 17 20:03:13 UTC 2012
[aur-mirror.git] / i2p / i2p.install
blob69cf99a9ec609af5de38937164d2b21532528919
1 # arg 1:  the new package version
3 post_install() {
4   /usr/sbin/groupadd i2p 2>/dev/null || true
5   /usr/sbin/useradd -s /bin/bash -g i2p -d /opt/i2p i2p 2>/dev/null || true
6   chown -R i2p:i2p /opt/i2p
7   /bin/true
10 # arg 1:  the new package version
11 # arg 2:  the old package version
12 post_upgrade() {
13   chown -R i2p:i2p /opt/i2p
15   if [ "$(vercmp $1 0.8.10-1)" -eq 1 ]; then
16     echo -en "Updating i2p user's shell..."
17     /usr/sbin/usermod -s /bin/bash i2p 2>/dev/null
18     echo -en "Done\n"
19   fi
20   /bin/true
23 # arg 1:  the old package version
24 pre_remove() {
25   /usr/sbin/userdel -r i2p
26   /bin/true
29 # arg 1:  the old package version
30 post_remove() {
31   /bin/true
34 op=$1
35 shift
36 $op $*