From fc14664401032728a3e00e5f855529d1a7178b45 Mon Sep 17 00:00:00 2001 From: Bastiaan Nelissen Date: Thu, 8 Dec 2016 19:55:58 +0100 Subject: [PATCH] hacked a non-existing homedir. --- auto_install/install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 928b3ea..fbbcb7b 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -911,8 +911,12 @@ confOVPN() { # verify server name to strengthen security $SUDO sed -i "s/SRVRNAME/${SERVER_NAME}/" /etc/openvpn/easy-rsa/pki/Default.txt - $SUDO mkdir "/home/$pivpnUser/ovpns" - $SUDO chmod 0777 -R "/home/$pivpnUser/ovpns" + # Here we expect the user (${pivpnUser}) to have it's own home dir... + # Some users do not have an own homedir. ("mkdir: cannot create directory `/home/XXXX/ovpns': No such file or directory") + # We should ask the user were to put the 'ovpns' dir. + # For now I hacked it using a '-p' flag + $SUDO mkdir -p "/home/$pivpnUser/ovpns" + $SUDO chmod 0777 -R "/home/$pivpnUser/ovpns" } installPiVPN() {