Sorry, I was a little busy these days. I will help you with the script
You have to change the values in the two scripts according to your needs.
In the second script, the last Variable is SHARE, I used it because my script files were on a windows share, I mounted with the mount command but you don't need to do this.
you just have to put the 3 files somewhere in a folder on your system.
Let's say you create a /SCRIPT folder and put the files inside
then the share value will be :
the Samba4.conf file is the Upstart instructions for samba to start at boot. so put it in your folder along with the script files
Be shure to reboot before you execute samba4-2.sh
If you need any help, feel free to add me to your Skype contacts, I'll be glad to helplike I did with JnPson. (you can send me a message via skype from the forum)