ProxmoxAAS-LDAP/src/package.js
Arthur Lu 9d6f62b4a3 fix openldap init script paas user token saving,
add config file with BASE_DN,
add async wrapper class for ldap client,
implement addUser getUser delUser,
add and implement addGroup delGroup methods
2023-11-17 19:49:11 +00:00

12 lines
223 B
JavaScript

import { readFileSync } from "fs";
import { exit } from "process";
export default (path) => {
try {
return JSON.parse(readFileSync(path));
}
catch (e) {
console.log(`Error: ${path} was not found.`);
exit(1);
}
};