Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[risolto]/etc/init.d/[servizio] in gentoo
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
arnor
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2004
Posts: 147

PostPosted: Thu Apr 28, 2005 6:30 pm    Post subject: [risolto]/etc/init.d/[servizio] in gentoo Reply with quote

Ciao forum

sto provando a scrivere uno script di avvio per jrun sotto gentoo.
Apparte che per l'installazione ho dovuto copiare a mano i file perchè l'installer di instalanywhere non andava :/ ora ho qualche problema con lo script:
Code:

depend() {
        use dns logger mysql postgresql net
}

start() {
 ebegin "Starting Jrun"
 start-stop-daemon --start --quiet --chuid jrun:apache --exec /opt/jrun4/bin/jrun --$1
 sleep 5
 eend $?
}

stop() {
 ebegin "Stopping Jrun"
 start-stop-daemon --start --quiet --chuid jrun:apache --exec /opt/jrun4/bin/jrun --$1
 sleep 5
 eend $?
}


io credo che il problema sia nel passare i parametri perchè al file /opt/jrun4/bin/jrun i parametri non arrivano.
l'errore che lancià è questo:
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:310)
at java.awt.Frame.<init>(Frame.java:419)
at javax.swing.JFrame.<init>(JFrame.java:194)
at jrunx.util.ui.BusyJFrame.<init>(BusyJFrame.java:12)
at jrunx.launcher.GUIView.<init>(GUIView.java:145)
at jrunx.launcher.GUIView.<init>(GUIView.java:140)
at jrunx.launcher.GUIView.main(GUIView.java:114)
at jrunx.kernel.JRun.main(JRun.java:119)

Usage: -[start,stop,restart,status] [server ...] (no arg means all servers) or -[stop,restart] server [server ...] -username <jndi-principal> -password <jndi-credentials> or -info or -version or -usage[/code]

sembra che voglia far partire la GUI ma io il parametro di avvio l'ho passatto (--$1) teoricamente la gui non dovrebbe partire.
io vorrei arrivare a fare uno script tipo /etc/init.d/jrun start|stop "nome vserver"

qualche idea?
grazie Lorenzo


Last edited by arnor on Fri Apr 29, 2005 1:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31465
Location: here

PostPosted: Thu Apr 28, 2005 8:30 pm    Post subject: Reply with quote

Non puoi passare un parametro (se non quelli di default) agli initscript. per fare quello che vuoi tu dovresti fare un file di configurazione. Per maggiori infomazione leggi http://www.gentoo.org/doc/it/handbook/handbook-x86.xml?part=2&chap=4
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
arnor
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2004
Posts: 147

PostPosted: Fri Apr 29, 2005 1:05 pm    Post subject: Reply with quote

grazie, ora ho capito. Diciamo che è una particolarità di jrun il fatto di poter riavviare un virtual server e non tutto il servizio quando lancio il binario. vedrò se ha senso aggiungere il file di configurazione oppure creare un file per ogni virtual server.

Ciao Lorenzo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum