Command

This executable can run non-interactive system commands.
  1. Comment

    Generate the FreeBSD package with fpm and upload it to the target.

    echo /path/to/command >x.sh
    fpm -n x -s dir -t freebsd -a all --before-install x.sh .
    
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    pkg install -y --no-repo-update ./x-1.0.txz