|
From: Max S. <MSt...@li...> - 2003-08-12 21:08:10
|
Leif, I tried playing around with Linux in order to get restart working for the wrapper, and this is what I found. 1. Starting wrapper at boot time In order to restart wrapper at boot time, you need to do the following: * Move to directory -> /etc/init.d * Create file -> mywrapper (see attached file) * Mywrapper file should have content that can be used by Linux utility: chkconfig * Run command: chkconfig -level 2345 mywrapper on. This will enable your application to start at boot time. The only problem I see with running application using wrapper at boot time, is that if you have any UI to display to the user, your application will crash because X-Windows environment has not being loaded yet. It will only be loaded at the time of user login 2. Starting wrapper at login In order to restart wrapper at login time, I modified my .bash_profile file in my home directory to include command needed to start the wrapper: /root/wrapper/wrapper_linux_3.0.4/bin/testwrapper start. That's pretty much it. If you determine that there is a better way to do it please let me know. The downfall of the second approach is that it will only work for a specific user, because .bash_profile script is user specific; another user will not have access to it, because it will have its own. Thanks Max |