modified scripts to be run on freebsd