I wrote a program which automatically shuts down a Raspberry Pi 3b (Ubuntu Server 16.04) as soon as a button is pressed. It's nothing than a small bash script which reads a GPIO pin of the Pi every second and shuts down the device if the button is pressed.
However, I made a mistake and the condition is always true, meaning that the program shuts down the Pi as soon as it is started. Because of incredible stupidness, I already linked this program to systemd ('After=multi-user.target'). Meaning: as soon as the Pi finished booting, it shuts itself down again. I don't see any chance to interrupt this process. Is there a way to edit the '/boot/config.txt' in a way that certain 'systemd' processes are suppressed? Any other idea how I could fix this system? On my Mac I only see the boot partition and my Linux computer has no SD Card slot.
P.S.: I flashed one of these images to the SD card in the beginning https://ubuntu-pi-flavour-maker.org/download/ using 'dd'. P.S.2: Shutdown is initialized by 'poweroff'