Merge branch 'fs-nosql' into v1
This commit is contained in:
commit
0a10d0ac4f
22
install.sh
22
install.sh
|
@ -218,12 +218,28 @@ install_my_app()
|
|||
{
|
||||
#git clone git@git.daplie.com:Daplie/walnut.js.git
|
||||
#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
|
||||
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.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
|
||||
npm install
|
||||
|
@ -240,4 +256,4 @@ install_service
|
|||
|
||||
sudo chown -R www-data:www-data /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
|
||||
|
|
|
@ -21,17 +21,8 @@ module.exports.create = function (app, xconfx, models) {
|
|||
}
|
||||
|
||||
xconfx.primaryDomain = xconfx.primaryDomain || conf.primaryDomain;
|
||||
|
||||
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;
|
||||
});
|
||||
// backwards compat for something or other
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue