Automating PMS on boot

Script was posted here: PKG update/upgrade dosen't work...How do I update using ports?