monkeysphere.install 956 Bytes
Newer Older
Valo's avatar
Valo committed
1 2 3 4 5 6 7
#!/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..."
8 9 10 11 12 13 14 15 16 17
    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
Valo's avatar
Valo committed
18 19 20 21

}

pre_remove() {
22 23 24
  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"
 }