Detect synology shutdown to shut down other server

Posted on

Problem :

I have a cubietruck (raspberry like) Linux server, which is powered by USB from a synology server.
This unconventional setup has some reasons. The problem is now that when the synology server shuts down, power is cut from its USB ports. So the cubietruck is not shut down properly.

My question: Is it possible the synology server detects when a shutdown/reboot/… is imminent and sends a signal to the cubietruck? Or otherwise; cubietruck detects when the synology server is shutting down, so it can shutdown itself quickly?

Solution :

Synology runs some sort of Linux, you just need to enable SSH access in control panel, if it’s not done yet. After that, you’ll be able to deal with init scripts and run something at shutdown.

There’s a thread at Synology forum on how their init scripts work:

Leave a Reply

Your email address will not be published. Required fields are marked *