Replace /etc/.pivpn/ with $pivpnFilesDir
Replace /etc/.pivpn/ with $pivpnFilesDir

/etc/.pivpn/ is refferenced multiple times trough the script,
Replaced all of them with $pivpnFilesDir
Quoted some unquoted vars

pivpn/pivpn