Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DYI Power Button for PC Engines APU

    Scheduled Pinned Locked Moved Hardware
    3 Posts 2 Posters 442 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dobby_D
      Dobby_
      last edited by

      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 goal

      A short button press shut down the system.
      A long button press is a hard stop.
      Pressing the button again power the APU up

      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
      

      Is this something that could run also for my pfSense
      box? It is the version 2.7 Devel I am running on.

      #~. @Dobby

      Turris Omnia - 4 Ports - 2 GB RAM / TurrisOS 7 Release (Btrfs)
      PC Engines APU4D4 - 4 Ports - 4 GB RAM / pfSense CE 2.7.2 Release (ZFS)
      PC Engines APU6B4 - 4 Ports - 4 GB RAM / pfSense+ (Plus) 24.03_1 Release (ZFS)

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        If it's just an ACPI power button no script is required. It will already trigger a system shutdown.

        Dobby_D 1 Reply Last reply Reply Quote 1
        • Dobby_D
          Dobby_ @stephenw10
          last edited by

          @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!

          #~. @Dobby

          Turris Omnia - 4 Ports - 2 GB RAM / TurrisOS 7 Release (Btrfs)
          PC Engines APU4D4 - 4 Ports - 4 GB RAM / pfSense CE 2.7.2 Release (ZFS)
          PC Engines APU6B4 - 4 Ports - 4 GB RAM / pfSense+ (Plus) 24.03_1 Release (ZFS)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.