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 https://github.com/Denisuu/OSMC_NesPi-SuperPi_Safe-Shutdown

I made the following changes for dietPi:

From the readme.md I changed these steps:

Step 2 run:

mkdir -p /home/dietpi/scripts && cd /home/dietpi/scripts && wget https://raw.githubusercontent.com/Denisuu/OSMC_NesPi-SuperPi_Safe-Shutdown/master/multi_switch.sh && chmod +x multi_switch.sh

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 :

[Unit]
Description=Nespi GPIO Init
After=network.target

[Service]
ExecStart=/home/dietpi/scripts/multi_switch.sh --nespi+

[Install]
WantedBy=multi-user.target

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: