## arg 1: the new package version #pre_install() { # do something here true #} ## arg 1: the new package version post_install() { useradd -s /usr/lib/neatx/nxserver-login-wrapper nx &> /dev/null mkdir -p ~nx/.ssh chown -R nx ~nx cp /usr/share/neatx/authorized_keys.nomachine ~nx/.ssh/authorized_keys chmod 600 ~nx/.ssh/authorized_keys grep -q '/opt/NX/lib' etc/ld.so.conf || echo '/opt/NX/lib' >> etc/ld.so.conf } ## arg 1: the new package version ## arg 2: the old package version pre_upgrade() { # do something here true } ## arg 1: the new package version ## arg 2: the old package version post_upgrade() { # do something here true } ## arg 1: the old package version pre_remove() { userdel nx > /dev/null 2>&1 rm -rf ~nx } ## arg 1: the old package version post_remove() { sed -ie '/\/opt\/NX\/lib/d' etc/ld.so.conf } op=$1 shift $op $* # vim:set ts=2 sw=2 et: