pre_install() { usermod -d /var/lib/gitea -s /usr/bin/bash git } post_install() { chown -R git:git /var/lib/gitea chown -R git:git /var/log/gitea chown -R git:git /etc/gitea systemctl daemon-reload } pre_upgrade() { pre_install $1 } post_upgrade() { post_install $1 } pre_remove() { systemctl stop gitea.service systemctl disable gitea.service } post_remove() { usermod -d / -s /usr/bin/git-shell git }