Merge branch 'fs-nosql' into v1

This commit is contained in:
AJ ONeal 2017-06-12 16:06:52 -06:00
commit 0a10d0ac4f
2 changed files with 21 additions and 14 deletions

View File

@ -218,12 +218,28 @@ install_my_app()
{ {
#git clone git@git.daplie.com:Daplie/walnut.js.git #git clone git@git.daplie.com:Daplie/walnut.js.git
#git clone https://git.daplie.com/Daplie/walnut.js.git /srv/walnut/core #git clone https://git.daplie.com/Daplie/walnut.js.git /srv/walnut/core
sudo mkdir -p /srv/walnut/{core,lib,etc,config,node_modules} sudo mkdir -p /srv/walnut/{core,lib,var,etc,node_modules}
rm -rf /srv/walnut/core/node_modules rm -rf /srv/walnut/core/node_modules
ln -sf ../node_modules /srv/walnut/core/node_modules ln -sf ../node_modules /srv/walnut/core/node_modules
sudo mkdir -p /srv/walnut/var/sites
sudo mkdir -p /srv/walnut/etc/org.oauth3.consumer sudo mkdir -p /srv/walnut/etc/org.oauth3.consumer
sudo mkdir -p /srv/walnut/etc/org.oauth3.provider sudo mkdir -p /srv/walnut/etc/org.oauth3.provider
sudo mkdir -p /srv/walnut/packages/{client-api-grants,rest,api,pages,services,sites} sudo mkdir -p /srv/walnut/etc/client-api-grants
sudo mkdir -p /srv/walnut/packages/{rest,api,pages,services}
# backwards compat
if [ -d /srv/walnut/packages/client-api-grants ]; then
mv /srv/walnut/packages/client-api-grants/* /srv/walnut/etc/client-api-grants/
rm -r /srv/walnut/packages/client-api-grants
#rmdir /srv/walnut/packages/client-api-grants
fi
if [ -d /srv/walnut/packages/sites ]; then
mv /srv/walnut/packages/sites/* /srv/walnut/var/sites
rm -r /srv/walnut/packages/sites
#rmdir /srv/walnut/packages/sites
fi
ln -s /srv/walnut/etc/client-api-grants /srv/walnut/packages/client-api-grants
ln -s /srv/walnut/var/sites /srv/walnut/packages/client-api-grants
pushd /srv/walnut/core pushd /srv/walnut/core
npm install npm install
@ -240,4 +256,4 @@ install_service
sudo chown -R www-data:www-data /srv/walnut || true sudo chown -R www-data:www-data /srv/walnut || true
sudo chown -R _www:_www /srv/walnut || true sudo chown -R _www:_www /srv/walnut || true
sudo chmod -R ug+Xrw /srv/walnut sudo chmod -R ug+rwX /srv/walnut

11
lib/bootstrap.js vendored
View File

@ -21,18 +21,9 @@ module.exports.create = function (app, xconfx, models) {
} }
xconfx.primaryDomain = xconfx.primaryDomain || conf.primaryDomain; xconfx.primaryDomain = xconfx.primaryDomain || conf.primaryDomain;
// backwards compat for something or other
var configpath = path.join(__dirname, '..', '..', 'config', conf.primaryDomain + '.json');
return fs.readFileAsync(configpath, 'utf8').then(function (text) {
return JSON.parse(text);
}, function (/*err*/) {
console.log('DEBUG not exists leconf', configpath);
return false;
}).then(function (data) {
return true; return true;
}); });
});
} }
function initialize() { function initialize() {