Using NESPI case with DietPi

If you would like to use the nespi case which has reset and power off buttons. I have used the following scripts from

I made the following changes for dietPi:

From the I changed these steps:

Step 2 run:

mkdir -p /home/dietpi/scripts && cd /home/dietpi/scripts && wget && chmod +x

For step 3:
I create a autostart service call nespi (sudo nano /etc/systemd/system/nespi.service)
The content are of the nespi.service are :

Description=Nespi GPIO Init

ExecStart=/home/dietpi/scripts/ --nespi+


To test nespi service run

sudo systemctl daemon-reload
sudo systemctl start nespi.service

To add the nespi service to autostart

sudo systemctl enable nespi.service

Credits to Denisuu for creating the script!

just as a side node. On DietPi, there is no user pi existing. Therefore it doesn’t make sense to create a home directory /home/pi/ for it. You should be able to use home directory of user dietpi.

Makes sense I have made the changes to the tutorial :slight_smile: