I am using orange pi zero and using Linux operating system(armbian) where am launching my firmware in the Start up. Hence there is no monitor, keyboard or mouse attached to the computer. My application will gets started upon startup.
Now I have an issue upon power failure or during forcefully cutting the power, the file system may tend to damage if it repeatedly happens and since PI is not connected to any monitor I can't turn off the OS Safely using the Shutdown button nor using the cmd terminal.
Now question is how to safely Shutdown the OS? This could be a common problem where headless computer used in any products, now how do people in industry handle this problem?