-
Notifications
You must be signed in to change notification settings - Fork 0
/
kk.js
24 lines (20 loc) · 806 Bytes
/
kk.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const winston = require('winston');
const child_process = require('child_process');
const which = require('which');
const config = require('./config');
const logger = new winston.Logger(config.logger.winston);
exports.testSync = function(cb) {
logger.debug("testing");
if(!process.env.HPSS_AUTH_METHOD || process.env.HPSS_AUTH_METHOD != "keytab") {
logger.error("HPSS ENVs not set. Please run kktgen");
//run kktgen
//var ret = child_process.spawnSync(__dirname+"/node_modules/kktgen/kktgen.sh", {stdio: [0,1,2]});
//if(ret.status != 0) process.exit(ret.status);
process.exit(1);
}
which('htar', (err)=>{
if(err) {
logger.error("can't find htar command in path. Try \"module load hpss\"?");
} else cb();
});
}