Syndicator icon indicating copy to clipboard operation
Syndicator copied to clipboard

Wishlist: Listen to Preparefor{Sleep|Shutdown} signals

Open martin9959 opened this issue 6 years ago • 3 comments

Wouldn't it be an idea to integrate a function to listen to these signals, in order to quit properly (before the network is going down) when the system is shutting down/going to sleep? This:

https://github.com/davidn/av/blob/master/av

could probably be adapted, but I don't have enough python knowledge to do it.

martin9959 avatar Dec 02 '18 20:12 martin9959

I’m not sure I understand what you want to do. What are “these signals”, and what exactly do you mean by “close properly”? Do you want to make sure that all files get synched before your system shuts down?

TentativeConvert avatar Dec 03 '18 07:12 TentativeConvert

Yes, and the connection closed. By "these signals" and "close properly" I thought of these discussions:

https://unix.stackexchange.com/questions/64151/networkmanager-disabled-network-when-sending-system-to-sleep

https://unix.stackexchange.com/questions/337853/how-can-i-trigger-a-systemd-unit-on-suspend-before-networking-is-shut-down

So my idea is that if syndicator (and unison) stop in time, I might still be able to unmount the (network-mounted) backup location before the network goes down.

martin9959 avatar Dec 03 '18 22:12 martin9959

I've never had any issues with unison being interrupted by a system shutdown, and I’m afraid I don’t have any time on my hands to implement the feature requested. I’ll leave this issue open -- if anyone wants to work on this, please go ahed.

TentativeConvert avatar Dec 10 '18 20:12 TentativeConvert