PI.SHUTDOWN - jedimatt42/tipi GitHub Wiki
PI.SHUTDOWN special file
Simply, if this file is created ( Opened, closed ), then the Raspberry PI will be halted, so it can be safe to remove power.
BASIC example:
10 OPEN #1:"PI.SHUTDOWN",OUTPUT,DISPLAY
30 CLOSE #1
40 PRINT "PI SHUTDOWN INITIATED. WAIT FOR PI LIGHTS TO STOP BEFORE POWERING OFF"