Page 1 of 1

restarting UMS in command prompt

Posted: Mon Jun 04, 2018 2:23 am
by Bembudo
Hello,

Is there a way to restart UMS in command prompt ? I wrote a script that converts all my videos to MP4, I want to be able to restart UMS in a batch file immediately after a file has been converted.

Re: restarting UMS in command prompt

Posted: Mon Jun 04, 2018 2:54 am
by Nadahar
There's no way to do that safely in Windows that I know off. In Linux you can use "kill -15", which should stop UMS normally instead of just terminating it and potentially corrupting the database and/or other files.

You can use taskkill under Windows AFAIK, but it doesn't shut it down gracefully. If you're using Windows I guess you could run UMS as a service, and stop and start it using "net restart", but running UMS as a service has multiple challenges: You don't get a GUI for UMS, and if you start UMS an an application (with GUI) while the service is running you will get problems. Also, running it as a service requires you to manually configure firewall rules if you use Windows firewall.

Re: restarting UMS in command prompt

Posted: Mon Jun 04, 2018 4:02 am
by Bembudo
Thanks Nadahar, No big deal I thought I would try. I'm just trying to find the laziest way possible :D However I did write the script in Ruby, is there a safe way in Ruby ?

Re: restarting UMS in command prompt

Posted: Mon Jun 04, 2018 4:07 am
by Nadahar
It doesn't depend on the script language, but the OS. If you're on Linux you should be able to find a way to send SIGTERM to the process from any language on Linux.