#!/bin/python

import RPi.GPIO as GPIO
import os

gpio_pin_number=YOUR_CHOSEN_GPIO_NUMBER_HERE

GPIO.setmode(GPIO.BCM)

GPIO.setup(gpio_pin_number, GPIO.IN, pull_up_down=GPIO.PUD_UP)

try:
    GPIO.wait_for_edge(gpio_pin_number, GPIO.FALLING)
    print("Shutdown is starting ...")
    os.system("sudo shutdown -h now")
except:
    pass

GPIO.cleanup()

7d5830d6c6ed19429e79ce666e4af4bbeb4105b6
<mask token>

<mask token>
GPIO.setmode(GPIO.BCM)
GPIO.setup(gpio_pin_number, GPIO.IN, pull_up_down=GPIO.PUD_UP)
try:
    GPIO.wait_for_edge(gpio_pin_number, GPIO.FALLING)
    print('Shutdown is starting ...')
    os.system('sudo shutdown -h now')
except:
    pass
GPIO.cleanup()

<mask token>
gpio_pin_number = YOUR_CHOSEN_GPIO_NUMBER_HERE
GPIO.setmode(GPIO.BCM)
GPIO.setup(gpio_pin_number, GPIO.IN, pull_up_down=GPIO.PUD_UP)
try:
    GPIO.wait_for_edge(gpio_pin_number, GPIO.FALLING)
    print('Shutdown is starting ...')
    os.system('sudo shutdown -h now')
except:
    pass
GPIO.cleanup()

import RPi.GPIO as GPIO
import os
gpio_pin_number = YOUR_CHOSEN_GPIO_NUMBER_HERE
GPIO.setmode(GPIO.BCM)
GPIO.setup(gpio_pin_number, GPIO.IN, pull_up_down=GPIO.PUD_UP)
try:
    GPIO.wait_for_edge(gpio_pin_number, GPIO.FALLING)
    print('Shutdown is starting ...')
    os.system('sudo shutdown -h now')
except:
    pass
GPIO.cleanup()

#!/bin/python

import RPi.GPIO as GPIO
import os

gpio_pin_number=YOUR_CHOSEN_GPIO_NUMBER_HERE

GPIO.setmode(GPIO.BCM)

GPIO.setup(gpio_pin_number, GPIO.IN, pull_up_down=GPIO.PUD_UP)

try:
    GPIO.wait_for_edge(gpio_pin_number, GPIO.FALLING)
    print("Shutdown is starting ...")
    os.system("sudo shutdown -h now")
except:
    pass

GPIO.cleanup()
