web/website/scripts/install-support-session-renewal.mjs
unimatrixgit 77cdf19faa Checkpoint Alpha 1.0.0.3 graphical menus and moderation evidence
Preserve the current Alpha source and artwork snapshot. See handoff/alpha-1.0.0.3 for actual deployed hashes, checks, staged follow-ups and the production pause. This checkpoint does not claim every source feature is deployed.
2026-11-02 00:05:34 +01:00

2 lines
643 B
JavaScript

import {readFileSync,writeFileSync,copyFileSync} from 'node:fs';
const root=process.argv[2];if(!root)throw Error('Provide the osTicket root');const file=root+'/client.inc.php';let source=readFileSync(file,'utf8');if(!source.includes('dune_renew_ticket_client($thisclient)')){copyFileSync(file,file+'.before-dune-renew');source=source.replace('$thisclient = UserAuthenticationBackend::getUser();',"$thisclient = UserAuthenticationBackend::getUser();\nif(function_exists('dune_renew_ticket_client'))$thisclient=dune_renew_ticket_client($thisclient);");writeFileSync(file,source);}console.log('Verified central identity renewal hook installed');