Run Script when Rsync Completes.

Status
Not open for further replies.

Gareth Hill

Dabbler
Joined
Jun 17, 2014
Messages
10
Hey all...again another question regarding Rsync.

As previously mentioned I sync files from my Freenas to my HTPC, I like to have this run late at night usually after midnight. my HTPC does not need to stay on all night/day and sometimes I do not even use it for a few days. Question is can I can a script after an Rsync profile completes? I have a script that will shutdown the HTPC but I'd like this to only run after completion rather than at some arbitrary time which would cause rsync to not complete.

Thanks again!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If you can find the script that runs rsync you could modify it to perform the shutdown after the rsync completes. Note that doing what you want to do basically voids all 'warranty' with FreeNAS working properly. Not to mention we don't recommend shutting down servers because they DO do stuff at night...
 

Gareth Hill

Dabbler
Joined
Jun 17, 2014
Messages
10
Sorry Cyberjock I think I did not make myself clear, the shutdown script is to shutdown the HTPC not the Freenas server. I am happy to leave that on now
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Sorry Cyberjock I think I did not make myself clear, the shutdown script is to shutdown the HTPC not the Freenas server. I am happy to leave that on now

Oh! Ok. I misread what you wrote. So used to people asking about their server. I'm going to move this to off-topic since it's not a FreeNAS question. ;)
 

Gareth Hill

Dabbler
Joined
Jun 17, 2014
Messages
10
Thanks well the rsync runs on Freenas and I wanted the Freenas to execute a "remote shutdown" script that will shut down the HTPC once it had finised pushing files over
 

Gareth Hill

Dabbler
Joined
Jun 17, 2014
Messages
10
Thanks for help I resolved this myself, Created a script that runs the RSYNC on the freenas and then shuts down the remote PC. Schedule this with Cron and did not use the RSYNC options within Freenas - works great and even wrote in error reporting for the RSYNC failures.
 
Status
Not open for further replies.
Top