How to watch a folder, sync it to cloud and delete files locally after?

I need to do this without root privileges or anything, I don’t have root access in the machine I’m uploading to run script or make a service…all I can do is use my own home folder…

I would like this to be working 24 hours…

Bonus if there’s a option to remove files only after X time.

You could use inotifywait with CREATE flag on your folder. And use screen to put it in background. After X time you could just add some sort of timer in your bash script. If your trying to do that because you use a torrent client. I’ve made a fork of transmission which is able to call a script after a seed ratio https://github.com/TimoPtr/transmission

i have downloaded and compiled this fork and there is no such settings in options…i dont see it, i am runing is as web deamon on vps, is that only in gui? can you add it to web interface too?

This is on settings.json you have two new parameters :

“script-torrent-done-seeding-enabled”: true,
“script-torrent-done-seeding-filename”: “/path/to/your/script”,

You have to enable ratio-limit with this two parameters

“ratio-limit”: 2,
“ratio-limit-enabled”: true,

Example (settings.json) :

{

“ratio-limit”: 2,
“ratio-limit-enabled”: true,
“script-torrent-done-seeding-enabled”: true,
“script-torrent-done-seeding-filename”: “/path/to/your/script”,

}

This will call your script when the ratio of 2 is reach. Like the “script-torrent-done” parameters the script will be launch with some env var like TR_TORRENT_NAME or TR_TORRENT_DIR

1 Like

thank you very much :slight_smile:

I have no ideia of what you said but I’ll take a look thanks.

I use deluge.