Public Access
Server-side printing, roll type setting, cache headers
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
// Reports what this container is actually running, so an upgrade that did not
|
||||
// land can be spotted without guesswork.
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const root = path.join(here, '..');
|
||||
|
||||
const FEATURES = [
|
||||
['server-side printing', 'src/printer.js', null],
|
||||
['roll type is a separate setting', 'src/routes/admin.js', 'printer_label'],
|
||||
['roll type in the console', 'public/js/admin.js', 'printerLabel'],
|
||||
['company field', 'src/routes/kiosk.js', 'company'],
|
||||
['separate login page', 'public/login.html', 'step-password'],
|
||||
['per-site branding', 'src/branding.js', null],
|
||||
['CA in DER form for Jamf', 'src/tls.js', 'caCertificateDer'],
|
||||
];
|
||||
|
||||
console.log('');
|
||||
for (const [name, file, needle] of FEATURES) {
|
||||
const full = path.join(root, file);
|
||||
let state = 'MISSING';
|
||||
if (fs.existsSync(full)) {
|
||||
state = !needle || fs.readFileSync(full, 'utf8').includes(needle) ? 'present' : 'OLD VERSION';
|
||||
}
|
||||
console.log(` ${state.padEnd(12)} ${name}`);
|
||||
}
|
||||
console.log('');
|
||||
console.log('Anything not "present" means this container is running older code.');
|
||||
console.log('On the docker host: git pull && docker compose up -d --build');
|
||||
console.log('');
|
||||
Reference in New Issue
Block a user