#!/bin/sh update_etc_shells() { # make git-shell a valid shell if ! grep -qe '^/usr/bin/git-shell$' etc/shells; then echo '/usr/bin/git-shell' >> etc/shells fi } post_install() { update_etc_shells } post_upgrade() { update_etc_shells } post_remove() { sed -i -r '/^\/usr\/bin\/git-shell$/d' etc/shells }