Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
62cc881fd4
29 changed files with 1722 additions and 34 deletions
|
@ -12,7 +12,7 @@ set -e
|
|||
|
||||
yum -y install epel-release
|
||||
|
||||
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
|
||||
curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -
|
||||
yum -y install mariadb-server nodejs ImageMagick git python redis pwgen bind-utils gcc-c++ make
|
||||
|
||||
systemctl start mariadb
|
||||
|
@ -225,4 +225,3 @@ systemctl start zone-mta.service
|
|||
systemctl start mailtrain.service
|
||||
|
||||
echo "Success! Open http://$HOSTNAME/ and log in as admin:test";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ set -e
|
|||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
curl -sL https://deb.nodesource.com/setup_6.x | bash -
|
||||
curl -sL https://deb.nodesource.com/setup_7.x | bash -
|
||||
apt-get -q -y install mariadb-server pwgen nodejs imagemagick git ufw build-essential dnsutils python software-properties-common
|
||||
|
||||
apt-add-repository -y ppa:chris-lea/redis-server
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
console.log('This script does not run in production'); // eslint-disable-line no-console
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
let config = require('config');
|
||||
let spawn = require('child_process').spawn;
|
||||
let log = require('npmlog');
|
||||
let path = require('path');
|
||||
let fs = require('fs');
|
||||
|
||||
log.level = 'verbose';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
log.error('sqldrop', 'This script does not run in production');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'test' && !fs.existsSync(path.join(__dirname, '..', '..', 'config', 'test.toml'))) {
|
||||
log.error('sqldrop', 'This script only runs in test if config/test.toml (i.e. a dedicated test database) is present');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function createDump(callback) {
|
||||
let cmd = spawn(path.join(__dirname, 'drop.sh'), [], {
|
||||
env: {
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
console.log('This script does not run in production'); // eslint-disable-line no-console
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
let dbcheck = require('../../lib/dbcheck');
|
||||
let log = require('npmlog');
|
||||
let path = require('path');
|
||||
let fs = require('fs');
|
||||
|
||||
log.level = 'verbose';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
log.error('sqlinit', 'This script does not run in production');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'test' && !fs.existsSync(path.join(__dirname, '..', '..', 'config', 'test.toml'))) {
|
||||
log.error('sqlinit', 'This script only runs in test if config/test.toml (i.e. a dedicated test database) is present');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
dbcheck(err => {
|
||||
if (err) {
|
||||
log.error('DB', err);
|
||||
|
|
1023
setup/sql/mailtrain-test.sql
Normal file
1023
setup/sql/mailtrain-test.sql
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue