#!/bin/sh

SAMBA_FILE=/var/smb.conf

if [ ! -n "$2" ]; then
	echo "insufficient arguments!"
	echo "Usage: $0 <dir name> <access path> <allow users>"
	echo "Example: $0 temp /temp admin"
	exit 0
fi

echo "
["$1"]
	path = "$2"
	valid users = "$3"
	browseable = yes
	writable = "$4"
	create mask = 0664
	directory mask = 0775
" >> $SAMBA_FILE

