After saving the file, mark it as executable withsudo chmod +x /etc/shutdown.sh

Key in

sudo nano /etc/systemd/system/irswitch2.service

Copy and paste the following text into the editor window[Unit]Description=RemotePi Board Shutdown ServiceBefore=multi-user.targetConflicts=shutdown.target[Service]ExecStart=/bin/trueExecStop=/etc/shutdown.shType=oneshotRemainAfterExit=yes[Install]WantedBy=multi-user.target

Press ctrl+x to exit, y to confirm, enter to save the file

Key insudo systemctl enable irswitch2.service

Reboot one time

After reboot you can use the RemotePi Board to power cycle Ubuntu Mate

The above scripts have been tested and are confirmed to work up to Ubuntu Mate 16.04 . Although not yet tested, they most likely will work with newer versions as well.