mirror of
https://github.com/elastic/kibana.git
synced 2025-04-22 08:49:27 -04:00
30 lines
907 B
JavaScript
30 lines
907 B
JavaScript
import { resolve } from 'path';
|
|
import { appendFileSync } from 'fs';
|
|
import exec from '../utils/exec';
|
|
import { capitalize } from 'lodash';
|
|
|
|
export default (grunt) => {
|
|
const userScriptsDir = grunt.config.get('userScriptsDir');
|
|
const { path, user, group, name } = grunt.config.get('packages');
|
|
|
|
grunt.registerTask('_build:pleaseRun', function () {
|
|
grunt.config.get('services').forEach((service) => {
|
|
grunt.file.mkdir(service.outputDir);
|
|
exec('pleaserun', [
|
|
'--install',
|
|
'--no-install-actions',
|
|
'--install-prefix', service.outputDir,
|
|
'--overwrite',
|
|
'--name', name,
|
|
'--description', capitalize(name),
|
|
'--user', user,
|
|
'--group', group,
|
|
'--sysv-log-path', `${path.logs}/`,
|
|
'-p', service.name,
|
|
'-v', service.version,
|
|
path.kibanaBin,
|
|
`-c ${path.kibanaConfig}`
|
|
]);
|
|
});
|
|
});
|
|
};
|