Mount DAV directory

# see http://linux.die.net/man/5/davfs2.conf
# see http://www.freebsd.org/cgi/man.cgi?query=mandoc_char&sektion=7&apropos=0&manpath=NetBSD%2B6.0 -> for cq character
# see http://passwordsgenerator.net/

# edit /etc/updatedb.conf:
# PRUNEFS="... davfs davfs2"

adrhcbImpl() {
	# sudo mkdir -p /mnt/adrhc
	# sudo chmod g+rw /mnt/adrhc
	
	# sudo chmod u+s /sbin/mount.davfs
	# sudo usermod -aG users user1
	# openssl s_client -connect adrhc.go.ro:443 -showcerts /dev/null | openssl x509 -outform PEM > /home/user1/.davfs2/certs/adrhc.go.ro-server-pub.pem
	#
	# in ~/.davfs2/secrets:
	# /mnt/adrhc-dav user1 "password" -> the enclosing character " is mandatory to use for the password or see special characters in http://linux.die.net/man/5/davfs2.conf
	#
	# later, when ~/.davfs2/davfs2.conf is automatically created change to:
	# trust_ca_cert	  /home/user1/.davfs2/certs/adrhc.go.ro-server-pub.pem
	# use_locks       0
	# same change do it in /etc/davfs2/davfs2.conf
	#
	# with /etc/fstab:
	# https://adrhc.go.ro/davshare/   /mnt/adrhc-davshare   davfs   rw,users,async,noauto   0   0
	# https://adrhc.go.ro/davsharep/   /mnt/adrhc-davsharep   davfs   rw,users,async,noauto   0   0
	# https://adrhc.go.ro/davshare1/   /mnt/adrhc-win   davfs   rw,users,async,noauto   0   0
	# https://adrhc.go.ro/davshare3/   /mnt/adrhc-linux   davfs   rw,users,async,noauto   0   0
	# 
	# the use mount command:
	# mount /mnt/adrhc-dav
	#
	# without fstab:
	# sudo mount -t davfs https://adrhc.go.ro/davshare3/ /mnt/adrhc-linux -o ro,uid=user1,gid=user1,noexec	
	
	# if [ "`mount | grep /mnt/adrhc`" != "" ]; then
	# 	echo "/mnt/adrhc already mounted"
	# 	return
	# fi
	# sshfs user1@adrhc.go.ro:/ /mnt/adrhc
	# echo "/mnt/adrhc mounted"

	if [ "`mount | grep /mnt/adrhc-dav`" != "" ]; then
		echo "/mnt/adrhc-dav already mounted"
		return
	fi
	mount /mnt/adrhc-dav
	if [ "$?" == 0 ]; then
		echo "/mnt/adrhc-dav mounted"
	else
		echo "/mnt/adrhc-dav NOT mounted"
	fi
}