usr=stackedit home=/var/lib/stackedit _chown() { chown -R $usr:$usr $home } ## 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 $home return 0 } # vim:set ts=2 sw=2 et: