DietPi v6.28.0, RPi Zero W, gpio-shutdown not working

I have just done a new install of DietPi v6.28.0 on a RPi Zero W.
After the updates and setup etc, I added the following line to config.txt (ie sudo nano /DietPi/config.txt):-

dtoverlay=gpio-shutdown,gpio_pin=20,active_low=1,gpio_pull=up


After a reboot, pressing the button that I have connected to GPIO20 and GND, nothing happens.
I am using GPIO20 because I require I2C and I2C uses GPIO2 and GPIO3.

I am using the same method of shutdown on a RPi3 that has been upgraded a couple of times to DietPi v6.28.0 (cannot remember which version it started out on) and it works as designed.

Could someone suggest where I should start looking as to why this is not working?

Regards,
John

OK. It’s been a while but I have found the solution.
Apparently systemd-logind is masked and blocks the detection of a shutdown signal.

more info in this page:-

https://dietpi.com/forum/t/dietpi-survey-information/32/1

The way to fix the problem is to:-
1 - Change the following line in dietpi.txt before first boot.

Unmask (enable) systemd-logind service (including dbus), which is masked by default on DietPi

AUTO_UNMASK_LOGIND=0
to
AUTO_UNMASK_LOGIND=1

OR

2 - If you have completed installation, do the following commands:-

sudo apt install dbus
sudo systemctl unmask systemd-logind
sudo systemctl start systemd-logind

I hope this helps someone out.

Regards,
John