First script version. Functional over a clean Raspbian installation.