# This is a default template for a post-install scriptlet.  You can
# remove any functions you don't need (and this header).

# arg 1:  the new package version
post_install() {
    add_service.sh apcupsd
    /sbin/sv start apcupsd
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
    post_install
}

# arg 1:  the old package version
post_remove() {
    /sbin/sv stop apcupsd
    remove_service.sh apcupsd
}

op=$1
shift
$op $*