Install scripts is a bash script contains command need to run before/after install/upgrade/remove packages in system. The suffix of install script is <portname>.install. This install script need to placed in port directory and later will included in tar-ed package. The script contains the following functions which run at different times:

Example of install script for dbus.install:

pre_install() {
    getent group messagebus >/dev/null || groupadd -g 18 messagebus
    getent passwd messagebus >/dev/null || useradd -c "D-Bus Message Daemon User" -d /var/run/dbus -u 18 -g messagebus -s /bin/false messagebus

post_install() {
    dbus-uuidgen --ensure