DYI Power Button for PC Engines APU
-
Hello,
I have two PC Engines APU boards and want to "install"
a "self made" button to reboot or "shutdown" the entire hardware if this will be able to realize. I was finding out
in another forum someone was realizing it for OPNSense
and I thought it would be also nice to have in pfSense.The hardware part will not be that problem, but the script that will be triggert or used by the button "action" might
be not running out of the box, so if someone is familiar
with that script language and can say something about
would be nice.Push button switch
For the shutdown or reboot
2 Dupont wires
To connect the button to the board
End product
This is the goalA short button press shut down the system.
A long button press is a hard stop.
Pressing the button again power the APU uplogin: >>> Invoking stop script 'beep' >>> Invoking stop script 'freebsd' Stopping redis. Waiting for PIDS: 33751. Stopping php_fpm. Waiting for PIDS: 617. Stopping maltrailserver. Stopping maltrailsensor. Waiting for PIDS: 78101. ntopng not running? Stopping nginx. Waiting for PIDS: 90908. Stopping flowd_aggregate...done Stopping flowd. Waiting for PIDS: 50464 72791. >>> Invoking stop script 'backup' >>> Invoking backup script 'captiveportal' >>> Invoking backup script 'dhcpleases' >>> Invoking backup script 'duid' >>> Invoking backup script 'netflow' Stopping flowd_aggregate...done flowd_aggregate already running? (pid=70631). >>> Error in backup script 'netflow' >>> Invoking backup script 'rrd' >>> Invoking stop script 'config' ovpns2: link state changed to DOWN Waiting (max 60 seconds) for system process `vnlru' to stop... done Waiting (max 60 seconds) for system process `bufdaemon' to stop... done Waiting (max 60 seconds) for system process `syncer' to stop... Syncing disks, vnodes remaining... 7 3 0 done All buffers synced. Uptime: 3m15s uhub2: detached acpi0: Powering system off
Is this something that could run also for my pfSense
box? It is the version 2.7 Devel I am running on. -
If it's just an ACPI power button no script is required. It will already trigger a system shutdown.
-
@stephenw10 said in DYI Power Button for PC Engines APU:
If it's just an ACPI power button no script is required. It will already trigger a system shutdown.
Cool thank you for that information!