summaryrefslogtreecommitdiff
path: root/pcr/monkeysphere/monkeysphere.install
blob: 5ab08134240fb70a80c39bdba2fd5952941de560 (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
#!/bin/sh
# $Id: monkeysphere.install 264 2010-11-10 00:57:53Z shtrom $
# vim:set ts=2 sw=2 et:

# arg 1:  the new package version
post_install() {
  echo ">>> Creating monkeysphere user and group and setting permissions..."
    getent group monkeysphere >/dev/null || groupadd -r monkeysphere
    getent passwd monkeysphere >/dev/null ||useradd -r -c 'Monkeysphere WoT server identification tool' -g monkeysphere -d '/var/lib/monkeysphere' -s /bin/bash monkeysphere
	echo ">>> Trying all available transitions..."
    for trans in 0.23 0.28 ; do
        /usr/share/monkeysphere/transitions/$trans || { \
            RET=$?
            echo "Failed running transition script /usr/share/monkeysphere/transitions/$trans" >&2
            exit $RET
        }
    done

}

pre_remove() {
  echo ">>> /var/lib/monkeysphere files and folder will be left in place,
    remove any reference to them from openssh-server config file to avoid being locked outside"
 }