Call callback on ACPI Power Button event -- compatible with Google Compute Engine[tm] stop event
Calls designated callback on ACPI Power Button event
npm i before-power-off -S
const beforePowerOff = require('before-power-off');
beforePowerOff(callSomeNamedFunction);
beforePowerOff(function(){ // stuff to do before power off });
beforePowerOff( ()=>{ // stuff to do before power off } );
/var/run/acpid.socket
.once()
not .on()
Copyright 2017 Paul Brewer drpaulbrewer@eaftc.com - Economic and Financial Technology Consulting LLC
Available under the terms of The MIT License