Page 1 of 1

Proper Serviio Shutdown Routine using FreeNAS

PostPosted: Fri Jul 29, 2011 5:20 pm
by LLoyd
I have Serviio running on FreeNAS.

Should I add a FreeNAS "Shutdown" script with the following command: "sh /serviio-0.5.2/bin/serviio.sh -stop" ...to properly shutdown the Serviio server or will FreeNaS properly shutdown the Serviio server when the user selects "Reboot" or "Shutdown" from the FreeNAS "System" menu?

Another question: How would I know (or how could I check) if FreeNAS shutdown the Serviio server properly? What log should I be looking at and what entries would tell me if the Serviio server shutdown "correctly"?

Currently, I have no script running on FreeNAS to properly shutdown the Serviio server. I just shutdown FreeNAS (using the FreeNAS web-based configuration utility) and it just terminates the Serviio server? I'm hoping that's good enough. Should I use the following command instead: "sh /serviio-0.5.2/bin/serviio.sh -stop"?

Thanks, Lloyd

Re: Proper Serviio Shutdown Routine using FreeNAS

PostPosted: Fri Jul 29, 2011 5:33 pm
by Cerberus
i would say it would be fine without a shutdown script but then adding one wont hurt either.

Re: Proper Serviio Shutdown Routine using FreeNAS

PostPosted: Sat Jul 30, 2011 2:50 am
by zip
There is a hook that gets executed when Serviio process quits. This will not work if you kill the process with kill -9 for example or just shutdown the PC. The hook code basically sends notification to the network that Serviio is no longer available, clear any transcoded files and shuts down the database properly.

Nothing terrible happens if you just kill the process, only startup will be slightly slower due to the database check/fix.

Re: Proper Serviio Shutdown Routine using FreeNAS

PostPosted: Sat Jul 30, 2011 7:03 pm
by LLoyd
zip,

What do you suggest I use for a FreeNAS "Shutdown" script to graceful shutdown your program?

Please tell me what would be best. Create a new script for shutdown and not not use the serviio.sh script, or use the command (below) and use a different parameter other than "-stop".

sh /serviio-0.5.2/bin/serviio.sh <fill in the blank of what I should use to shutdown your program gracefully>

Re: Proper Serviio Shutdown Routine using FreeNAS

PostPosted: Sun Jul 31, 2011 2:12 am
by zip
serviio.sh -stop is the proper way.