I think i have found a dirty and very different solution but it works:    I have created a service in systemd that is run before reboot.target   The service created is:   [Unit] Description=test Before=reboot.target DefaultDependencies=no [Service] ExecStart=/path_to_your_bash_file/file.sh Type=oneshot RemainAfterExit=yes [Install] WantedBy=reboot.target   In the file.sh i activate a digital gpio pin for runnig a HW reset using the volta