restarting UMS in command prompt
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
restarting UMS in command prompt
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.
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
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.
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
Thanks Nadahar, No big deal I thought I would try. I'm just trying to find the laziest way possible
However I did write the script in Ruby, is there a safe way in Ruby ?

Re: restarting UMS in command prompt
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.