Better variable names
shebang fixed and using os calls
Use PIPE to pass GPG key to apt-key(8)