auto rebooting MOC after power loss

MOC version: 
2.6 Alpa3

I lose power in my area occasionally and would really like my system (RPi3) to auto reboot like I can with the bios under other pc's i have. I realise this is RPi specific but wondered if anyone else had pursued this with a RPi at all?

I found someones work around for dealing with this and it read:

"I managed to get past this issue by installing the operating system on a usb stick, I used a "cruzer fit" stick due to how small it is.

I would then modify the boot sequence on the SD card to boot from the usb stick. Read write would switch to the usb stick after boot thus limiting the chance for the sd card to get corrupted.

The device in question has been running as a media centre for more than a year and dropping power of any kind has not caused any issues yet"

...I have no idea if the above will sit ok with MOC but any pointers will help me not waste time trying possibly!

The only thing that may here have something to do with MOC is the fact that sometimes when MOC shuts down not cleanly, it leaves behind a PID file (~/.moc/pid) which needs to be manually removed after restart.

Other things are more less unrelated or RPi specific. However from my experience, reboots rarely cause data corruption these days with modern journaling filesystems. But you probably know that the best solution to your problem is to get a UPS :)

yes i think a UPS is probably the way to go for me, and yes i am experiencing the PID file remove flag because of my shutdowns. thanks

There will be numerous examples on your system of what it is (we think) you're trying to achieve. Check out your /etc/rc.d or /etc/init.d directory (or whatever SystemD uses if that's what RPi uses), or /etc/inittab. Using those clues you should be able to auto-restart MOC, if that's your intent.

As to the more general question of how to auto-restart the RPi itself, that is outside the scope of this Forum. You would need to consult a more RPI-specific source.

i'm not in deep enough to understand everything you mention but yes point taken about other forum, thanks.