Hi
I am using webrick server for my application in ~/sample. For every boot
of
computer, i need to start the webrick server in ~/sample. Kindly anyone
help
me to start up the webrick server at the initial boot of computer with
specified port as automated startup.
–
With Regards,
Palani Kannan. K,
On Mon, Nov 15, 2010 at 2:48 AM, PalaniKannan K
[email protected] wrote:
I am using webrick server for my application in ~/sample. For every boot of
computer, i need to start the webrick server in ~/sample. Kindly anyone help
me to start up the webrick server at the initial boot of computer with
specified port as automated startup.
If you’re on a *nix platform, look at the startup scripts in /etc/init.d
or
equivalent and make one for webrick. Recent Macs use launchd
with files named *.plist and again you can find plenty of examples to
use as a basis for your own script.
If you’re on Windows, I have no idea
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
Hi Hassan
I am using linux only. I tried to create script on /etc/init.d. But, it
doesnt start the webrick server within my project data @ ~/sample. If u
know
the script for initiating webrick from the /etc/init.d to my project
data @
~/sample during starting of OS kindly help me.
–
With Regards,
Palani Kannan. K
On Mon, Nov 15, 2010 at 10:33 AM, PalaniKannan K
[email protected] wrote:
I am using linux only. I tried to create script on /etc/init.d. But, it
doesnt start the webrick server within my project data @ ~/sample. If u know
the script for initiating webrick from the /etc/init.d to my project data @
~/sample during starting of OS kindly help me.
I don’t use webrick, but init scripts are pretty trivial. Post what you
tried and explain how it failed.
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
On 11/16/2010 11:23 AM, PalaniKannan K wrote:
This script is working if i initiate as “/etc/init.d/webrick”. But, it
doesnt start with system boot. (I provided 777 permission too…), I
dont know this will be permission issue for execution or some other issue.
You need to place a symbolic link in the directory of your current
runlevel. It’s something like /etc/rcX.d/. You get your current runlevel
by executing runlevel
. On Debian based system it’s supposed to be 2.
So you have to place the link in /etc/rc2.d.
HTH
Cheers,
Jan
Hi hassan,
Your suggestion is valuable. I tried as you told…
This script is working if i initiate as “/etc/init.d/webrick”. But, it
doesnt start with system boot. (I provided 777 permission too…), I
dont
know this will be permission issue for execution or some other issue.
–
With Regards,
Palani Kannan
Dear All,
I included the /etc/init.d/webrick to System->Preferences->Startup
Applications->Add “/etc/init.d/webrick”. Now its started and keep on
running
in my Linux. Thanks lot everyone for giving your suggestions. If you
have
any comment over this answer kindly post.
–
With Regards,
Palani Kannan. K
Dear Jan,
I created symbolic link of /etc/init.d/webrick to /etc/rc2.d/webrick.
Still,
its same problem. The server is not starting at system boot up.
I feel that webrick start during system boot and stoped immediately
without
keep on running. Any way to keep on running webrick in linux?
–
With Regards,
Palani Kannan. K
On 16 November 2010 11:37, PalaniKannan K [email protected]
wrote:
Dear All,
I included the /etc/init.d/webrick to System->Preferences->Startup
Applications->Add “/etc/init.d/webrick”. Now its started and keep on running
in my Linux. Thanks lot everyone for giving your suggestions. If you have
any comment over this answer kindly post.
Note that this (I believe) will start it when you login, not when you
boot. That may be ok for you of course, but is not actually what you
asked for.
Colin
Dear Collin,
You are exactly correct, I accept. Up to my requirement, startup is
enough
to initiate webrick. Ofcourse, It needs to be do so, for boot time
initiation.
–
With Regards,
Palani Kannan. K