# OnOff Shim - Script installation not successfully

**URL:** <https://forums.pimoroni.com/t/onoff-shim-script-installation-not-successfully/13305>\
**Category:** Support\
**Created:** [March 15, 2020, 10:48am UTC](https://forums.pimoroni.com/t/onoff-shim-script-installation-not-successfully/13305 "2020-03-15T10:48:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![atkins](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@atkins](https://forums.pimoroni.com/u/atkins)\
**Post date:** [March 15, 2020, 10:48am UTC](https://forums.pimoroni.com/t/onoff-shim-script-installation-not-successfully/13305/1 "2020-03-15T10:48:42Z")

</div>

The install of the script does not work.  
I tried to install it on LibreElec (Raspberry Pi Zero WH - by using SSH)

The result is:  
curl: (23) Failed writing body (264 != 16384)

→ identical to the the post:

> [@Onoff shim script problem](https://forums.pimoroni.com/t/onoff-shim-script-problem/5971):
>
> When I ssh into RPi3 running Rasplex and try to run the script curl [https://get.pimoroni.com/onoffshim](https://get.pimoroni.com/onoffshim) | bash I get an error RasPlex (official) Version: 1.6.2.123-e23a7eef RasPlex git: 7580777a4bed0010d190ac3f04ebc686bf28a414 RasPlex:~ # curl [https://get.pimoroni.com/cleanshutdown](https://get.pimoroni.com/cleanshutdown) | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:–:-- 0:00:05 --:–:-- 0ba …

But this topic was closed without any solution.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 15, 2020, 11:31am UTC](https://forums.pimoroni.com/t/onoff-shim-script-installation-not-successfully/13305/2 "2020-03-15T11:31:36Z")

</div>

One issue is that curl script / installer is meant to be run on a system running Raspbian.  
Run it on another OS and there is a good chance it will fail.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 15, 2020, 11:39am UTC](https://forums.pimoroni.com/t/onoff-shim-script-installation-not-successfully/13305/3 "2020-03-15T11:39:12Z")

</div>

This "might’ work though with the on off shim.  
The first overlay gpio-shutdown will have the Pi shutdown if GPIO 17 is grounded. That happens when you push the button on the on off shim.  
The second gpio-poweroff overlay will pull GPIO 4 low and hold it low when the Pi does its very final shutdown. Thats the signal to the on off shim to cut power.  
Add these two lines to your config.txt file, if it exists and see what happens.

```auto
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
dtoverlay=gpio-poweroff,gpiopin=4,active_low=1

```
