OPNsense Forum

English Forums => Hardware and Performance => Topic started by: Northguy on August 30, 2019, 05:40:38 pm

Title: [HOWTO] Graciously shutting down APU2D4 with a hardware button
Post by: Northguy on August 30, 2019, 05:40:38 pm
Hi All,

APU Boards and housings do not come with a power button, so when the box becomes unresponsive, the only way to realize a reboot by yanking the power cable from the wall socket and reinsert it. So I decided to install a hardware button in the housing.

Researched topics:

Requirements:
2 jumpercables with sufficient wire length
1 momentary switch (push-to-make)
some heat shrink tube
7mm drill

Steps:

The power button works with a short press and shuts down the system. Long button press is a hard stop. Pressing the button again powers the device again. Mission accomplished.

(https://i.ibb.co/s64rJm1/IMG-20190830-154741752.jpg) (https://ibb.co/TbG5qv0)

(https://i.ibb.co/Kr4BRdd/IMG-20190830-161635436.jpg) (https://ibb.co/yQvKGtt)

Code: [Select]
login: >>> 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
Title: Re: [HOWTO] Graciously shutting down APU2D4 with a hardware button
Post by: nhtrung on December 16, 2019, 04:44:50 am
i have been an APU2D4 and it was a trouble. It is not work and i don't know how to fix it. Can you help me?
Title: Re: [HOWTO] Graciously shutting down APU2D4 with a hardware button
Post by: Northguy on December 23, 2019, 05:35:18 pm
Should work in a breeze when following info provided. Don't know what goes wrong?
Title: Re: [HOWTO] Graciously shutting down APU2D4 with a hardware button
Post by: Patrick M. Hausen on January 31, 2021, 09:16:33 pm
Works great for my apu4d4 - thanks!
Title: Re: [HOWTO] Graciously shutting down APU2D4 with a hardware button
Post by: vollans on February 07, 2021, 11:02:08 pm
Big thanks from me, as well. Works brilliantly, just need to find some push buttons that fit the holes better now.