View previous topic :: View next topic |
Author |
Message |
arnor Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 01 Nov 2004 Posts: 147
|
Posted: Thu Apr 28, 2005 6:30 pm Post subject: [risolto]/etc/init.d/[servizio] in gentoo |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
fedeliallalinea Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/161653968057192eb39329f.jpg)
Joined: 08 Mar 2003 Posts: 31465 Location: here
|
Posted: Thu Apr 28, 2005 8:30 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
arnor Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 01 Nov 2004 Posts: 147
|
Posted: Fri Apr 29, 2005 1:05 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|