Create a script in /usr/local/etc/rc.d and name it anything with ".sh" suffix, for example: mgen.sh Your mgen.sh script could be as simple as the following or more sophisticated if needed: #!/bin/sh root/mgen3.2a1/mgen -i fxp0 gscript exit 0