restart

How do I programatically restart a system service(not apache) from apache in linux?

家住魔仙堡 提交于 2019-11-30 17:06:31
问题 I need to simple way to allow an end user to restart tomcat from a web page served from apache on the same box. We're trying to make it easy for our QC department to deploy a new version of our webapp to apache. We're using samba, but we need an easy way for them to stop / start the tomcat server before/after the deployment. This would only be for internal qc boxes. Is there an existing solution for this? or would it be easier to write a few quick php application to handle this? 回答1: Like

Difference between os.execl() and os.execv() in python

点点圈 提交于 2019-11-30 16:43:30
Is there a difference between os.execl() and os.execv() in python? I was using os.execl(python, python, *sys.argv) to restart my script (from here ). But it seems to start from where the previous script left. I want the script to start from the beginning when it restarts. Will this os.execv(__file__,sys.argv) do the job? command and idea from here. I couldn't find difference between them from the python help/documentation. Is there a way do clean restart? For a little more background on what I am trying to do please see my other question At the low level they do the same thing: they replace

How to restart a JavaFX application when a button is clicked

末鹿安然 提交于 2019-11-30 15:31:25
I went through almost every post here regarding the matter but most of them doesn't explain what to do properly. To the question: I created a javaFX application, a dice game, human player vs. computer, but during any time while playing the game human player should be able to click button "new game" and what it should do is to restart the game from beginning. I tried relaunching the stage again but in javafx we cannot call the launch method twice. 1)Is there a way i can implement this without restarting the whole application? 2)if not how can i restart the application completely using a button

ASP.NET application pool shutdown problem

谁说胖子不能爱 提交于 2019-11-30 15:02:50
问题 Sometimes an exception causes application pool to shutdown. I start it manually but the question is how can I automate this behavior in IIS 7.0 (Windows server 2008). 回答1: If an application pool dies, the next request for a resource served by that pool will automatically restart it. If, however, you have rapid fail protection enabled on the app pool, and the pool dies more times than the number specified by the maximum failures property within the interval specified by the failure interval

Restart failed test case automatically in TestNG/Selenium

冷暖自知 提交于 2019-11-30 14:01:59
I am using Selenium webdriver, in Java with TestNG to run an X amount of test cases. What I would like, is for any test case to automatically restart (either from starting or from point of failure), as soon as it fails. I know TestNG framework has the following method @Override public void onTestFailure(ITestResult tr) { log("F"); } but I do not know how to find out which testcase it was and then how would I restart it. I wanted to see an example with actual code in it and found it here: Restarting Test immediately with TestNg Observe how the below tests will each be re-run once as soon as the

how do I restart an activity in android? [duplicate]

断了今生、忘了曾经 提交于 2019-11-30 13:39:27
This question already has an answer here: How do I restart an Android Activity 21 answers in an app that I am writing, there is a part of it that allows you to change a curtain setting. the problem is, that this setting won't take effect until the activity is recreated. is there a way to tell the app to restart using the onResume() method (hopefully allowing it to save everything in the onSaveInstanceState())? Ted Hopp This has been posted before : Intent intent = getIntent(); finish(); startActivity(intent); As of API level 11, you can also just call an activity's recreate() method. Not only

how to restart asp.net application besides modifying web.config

怎甘沉沦 提交于 2019-11-30 11:32:01
问题 Is there a recommended way to bounce an asp.net application besides touching web.config from inside the application? is HttpRuntime.UnloadAppDomain() ; the preferred way to do this ? and if so where do you do this? In the unload of a page or some other place in the application? 回答1: If this is .NET 2.0 or greater, then you can add in an "App_offline.htm" file, make a request to the server, remove it, and then make another request to the server. This sequence of events will force ASP.NET to

How to force restart after uninstall for a Basic MSI Project in InstallShield 2009 Premier

孤街醉人 提交于 2019-11-30 08:39:12
问题 InstallShield 2009 Premier, Basic MSI Project : After uninstall completes, I want to force restart the computer. How? Googling found, i have to set ' REBOOTPROMPT ' TO 'S' or 'R' and the " Reboot " property. How to set these properties and with what values? 回答1: Here is the Solution You have to let InstallShield know that you want a reboot . How? : From 'Installation Designer' tab -> 'Behavior and Logic' -> 'Custom Actions and Sequences' -> 'Sequences' -> 'Installation' -> 'Execute' -> '

Monitor Process in Python?

怎甘沉沦 提交于 2019-11-30 07:39:44
问题 I think this is a pretty basic question, but here it is anyway. I need to write a python script that checks to make sure a process, say notepad.exe, is running. If the process is running, do nothing. If it is not, start it. How would this be done. I am using Python 2.6 on Windows XP 回答1: There are a couple of options, 1: the more crude but obvious would be to do some text processing against: os.popen('tasklist').read() 2: A more involved option would be to use pywin32 and research the win32

Prevent Windows 10 from automatically restarting after an update programmatically

删除回忆录丶 提交于 2019-11-30 02:53:19
问题 QUESTION: Is there a programmatic way to prevent Windows 10 from automatically restarting after an update? We work on "mission-critical" software that runs in Windows. In general, it is bad if a Windows automatic update interrupts our process as it can mean lost money in scrapped material (you cannot stop and resume later, the job must work from start to finish uninterrupted). In the past, we were able to get around this by having our software installer set a parameter in the Windows Registry