Create directory structure if missing

- /usr/local/src, when cloning the git repository
  - /opt (this one was already taken into account but I had accidentally
    removed the mkdir command in the previous commit).
This commit is contained in:
Orazio 2020-05-28 12:09:02 +02:00
parent 823afa3fbb
commit 61c7151e3b

View file

@ -999,6 +999,9 @@ getGitFiles(){
} }
cloneOrUpdateRepos(){ cloneOrUpdateRepos(){
# /usr/local should always exist, not sure about the src subfolder though
$SUDO mkdir -p /usr/local/src
# Get Git files # Get Git files
getGitFiles ${pivpnFilesDir} ${pivpnGitUrl} || \ getGitFiles ${pivpnFilesDir} ${pivpnGitUrl} || \
{ echo "!!! Unable to clone ${pivpnGitUrl} into ${pivpnFilesDir}, unable to continue."; \ { echo "!!! Unable to clone ${pivpnGitUrl} into ${pivpnFilesDir}, unable to continue."; \
@ -2224,6 +2227,9 @@ confUnattendedUpgrades(){
} }
installScripts(){ installScripts(){
# Ensure /opt exists (issue #607)
$SUDO mkdir -p /opt
if [[ ${VPN} == 'wireguard' ]]; then if [[ ${VPN} == 'wireguard' ]]; then
othervpn='openvpn' othervpn='openvpn'
else else