mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-30 21:00:00 +00:00
ssh settings on a role
This commit is contained in:
parent
874794c996
commit
7a01a4e090
16 changed files with 982 additions and 484 deletions
28
server/setup/scriptsSqlite/1.16.0.ts
Normal file
28
server/setup/scriptsSqlite/1.16.0.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { __DIRNAME, APP_PATH } from "@server/lib/consts";
|
||||
import Database from "better-sqlite3";
|
||||
import path from "path";
|
||||
|
||||
const version = "1.16.0";
|
||||
|
||||
export default async function migration() {
|
||||
console.log(`Running setup script ${version}...`);
|
||||
|
||||
const location = path.join(APP_PATH, "db", "db.sqlite");
|
||||
const db = new Database(location);
|
||||
|
||||
// set all admin role sudo to "full"; all other roles to "none"
|
||||
// all roles set hoemdir to true
|
||||
|
||||
// generate ca certs for all orgs?
|
||||
|
||||
try {
|
||||
db.transaction(() => {})();
|
||||
|
||||
console.log(`Migrated database`);
|
||||
} catch (e) {
|
||||
console.log("Failed to migrate db:", e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
console.log(`${version} migration complete`);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue