fix ownership on os x

This commit is contained in:
AJ ONeal 2017-05-16 02:17:18 -05:00
parent b229bbc6cb
commit 47d72365cc
1 changed files with 11 additions and 2 deletions

View File

@ -129,7 +129,10 @@ install_etc_config()
$sudo_cmd mv "$my_app_dir/$my_app_etc_config" "$MY_ROOT/$my_app_etc_config"
fi
$sudo_cmd chown -R www-data:www-data $(dirname "$MY_ROOT/$my_app_etc_config")
# OS X
$sudo_cmd chown -R _www:_www $(dirname "$MY_ROOT/$my_app_etc_config") || true
# Linux
$sudo_cmd chown -R www-data:www-data $(dirname "$MY_ROOT/$my_app_etc_config") || true
$sudo_cmd chmod 775 $(dirname "$MY_ROOT/$my_app_etc_config")
$sudo_cmd chmod 664 "$MY_ROOT/$my_app_etc_config"
}
@ -171,8 +174,14 @@ export NPM_CONFIG_PREFIX=/opt/goldilocks
$sudo_cmd mkdir -p /etc/goldilocks
$sudo_cmd mkdir -p /var/log/goldilocks
$sudo_cmd mkdir -p /srv/www
$sudo_cmd mkdir -p /var/www
$sudo_cmd mkdir -p /opt/goldilocks/{lib,bin,etc}
$sudo_cmd chown -R www-data:www-data /srv/www /opt/goldilocks/{lib,bin,etc}
# OS X
$sudo_cmd chown _www:_www /var/www /srv/www || true
$sudo_cmd chown -R _www:_www /opt/goldilocks/{lib,bin,etc} || true
# Linux
$sudo_cmd chown www-data:www-data /var/www /srv/www || true
$sudo_cmd chown -R www-data:www-data /opt/goldilocks/{lib,bin,etc} || true
npm install -g 'git+https://git@git.daplie.com/Daplie/goldilocks.js.git#v1'
# Unistall