Koozali.org: home of the SME Server

startup script

portedaix

startup script
« on: July 16, 2006, 11:30:44 AM »
hello, I have a short script in /etc/e-smith/events/local to start a server at bootup (HLink server for kiss divx player). It has been fine for a while. Now the script, or any other script in /etc/e-smith/events/local, is not launched at bootup anymore. I have to do it manually : loggin from another computer to my sme server, cd /etc/e-smith/events/local, launch the script. The only thing I remember I did since it does not work is installing java. I checked all I could without success.

Any hint to have the scripts in /etc/e-smith/events/local launched again at bootup ?
thanks. olivier

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
startup script
« Reply #1 on: July 16, 2006, 11:50:56 AM »
Chapter 7 of the Developer Manual may help.

http://mirror.contribs.org/smeserver/contribs//gordonr/devguide/html/devguide.html#ACTIONS-EVENTS

although this bit might be more correct

http://mirror.contribs.org/smeserver/contribs//gordonr/devguide/html/devguide.html#AEN2105

especially if your script takes stop/start commands.
Regards,
William

IF I give advise.. It's only if it was me....

portedaix

startup script
« Reply #2 on: August 17, 2006, 12:47:34 AM »
I tried to understand how to make and daemon. It is too complicate for me. I tried unsuccessfully.

What I had it was a link to my binary in a short script to launch it a bootup. It contains just one line "java -cp /usr/local/bin/HellLink/ sf.jlink.JLink -nolaf -g". It stopped working one day for an unidentified reason. I would like to hvae it working again. Somebody has a clue ?

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
startup script
« Reply #3 on: August 17, 2006, 01:48:16 AM »
Regards,
William

IF I give advise.. It's only if it was me....

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
startup script
« Reply #4 on: August 17, 2006, 02:38:23 AM »
Quote from: "portedaix"
What I had it was a link to my binary in a short script to launch it a bootup. It contains just one line "java -cp /usr/local/bin/HellLink/ sf.jlink.JLink -nolaf -g". It stopped working one day for an unidentified reason. I would like to hvae it working again. Somebody has a clue ?

Unidentified reason?

In your previous post you say that you installed java. Seeing this invokes java, I would suggest that this is where the error is, try to run your script and see whether it works by running it locally (not the contents of the script, but the script itself) and see if there are any errors reported on the console or in /var/log/messages.

Trevor B
PS. If you found it hard to understand the developer doco, look at another package that uses runserv and mimic that....

portedaix

startup script
« Reply #5 on: August 17, 2006, 10:23:39 AM »
Thanks William and Trevor for your answers. I did follow Swerts Knudsen howto and hlink server is running beautiful for quite some time now. I try to be more accurate :
   -the command "sf.jlink.JLink -nolaf -g" works fine in the binary directory
   -I did a simple script with pico that I called "hlink", basically a text file, and made it executable. This script contains one line, "java -cp usr/local/bin/HellLink/sf.jlink.JLink -nolaf -g". I put htis script in /etc/e-smith/events/local directory. If I login with a ssh connection to the sme server, cd to this directory and execute ./hlink, my hlink server is up and running. Normally, this hlink script should execute at bootup by sme server automatically. That was the meaning of this /etc/e-smith/events/local directory. And it has been working so, for a while, executing my hlink script at bootup. But one day it stopped doing it and I do not know why. javascript:emoticon(':-(')
Sad

Thanks for any help.
Olivier