post_install() { printf "You've successfully installed misskey!\n" if ! [ -f "/etc/webapps/misskey/default.yml" ]; then cp "/etc/webapps/misskey/example.yml" "/etc/webapps/misskey/default.yml" fi printf "More on the setup: https://wiki.archlinux.org/title/Misskey\n" } ## $1: new package version ## $2: old package version pre_upgrade() { ## Ignore reinstallations of the same or older versions if [ $(vercmp $1 $2) -gt 0 ] ; then ## Shut down the misskey service before touching it's files if systemctl is-active misskey.service > /dev/null; then printf "Shutting down misskey\n" systemctl stop misskey.service fi fi } post_upgrade() { ## Ignore reinstallations of the same or older versions if [ $(vercmp $1 $2) -gt 0 ] ; then /usr/bin/misskey -m fi }