Don't understand the #!/bin/bash
So I did a few web searches on 'linux startup batch' and thought maybe you were referring to .bashrc.
I was using /etc/rc.local for the autostart before.
I added your command line to the end of the .bashrc file but it doesn't start mining.
Didn't work in the rc.local file either.
Also when I SSH in and try screen -r bfgminer
I get
-bash: -screen: command not found
So, what am I doing wrong?