[Unit] Description=This service will execute the /etc/rpishutdown/hooks/pre-poweroff script if the UPS power supply fails [Service] Type=oneshot RemainAfterExit=true ExecStart=/bin/true ExecStop=/etc/rpishutdown/hooks/check-pre-poweroff [Install] WantedBy=sysinit.target