|
From: Horace P. <fli...@ya...> - 2007-09-28 12:57:27
|
leif,=0A=0Athank you for your ultra fast response :D=0A=0Ai now use the svn= version of your script.=0A=0Ai turned out, that i made some changes that c= aused the problem:=0A=0A# Application=0AAPP_NAME=3D"@server@"=0AAPP_LONG_NA= ME=3D"@my server@"=0A# Wrapper=0AWRAPPER_CMD=3D"./wrapper"=0A=0Anow works p= erfectly, while=0A=0A# Application=0A=0AAPP_NAME=3D"server"=0A=0AAPP_LONG_N= AME=3D"my server"=0A=0A# Wrapper=0A=0AWRAPPER_CMD=3D"./wrapper"=0A=0A=0Adid= not work.=0A=0Abtw .... is there a way to find out if the application was = started as a nt service / linux daemon in contrast to console? currently i = specify '-server' as an parameter to the application but it would be great = to decide this without any parameter. i use the method 1 for integration.= =0A=0Alast but not least: keep up the great work - wrapper is fantastic! :D= =0A=0Acheers,=0Ahorace=0A=0A=0A----- Original Message ----=0AFrom: Leif Mor= tenson <le...@ta...>=0ATo: wra...@li...= =0ASent: Friday, September 28, 2007 2:24:19 PM=0ASubject: Re: [Wrapper-user= ] centos5 - Can't make old wrapper daemon go away=0A=0AHorace,=0AWhat versi= on of the Wrapper are you using? I was working with a=0Acustomer up until = a couple months ago working with CentOS and=0Ait was working perfectly. Th= at was using the latest script out of=0ASVN though:=0Ahttp://wrapper.svn.so= urceforge.net/viewvc/*checkout*/wrapper/trunk/wrapper/src/bin/sh.script.in= =0A=0AFor some reason the value of $WRAPPER_CMD is not being found in=0Athe= output of your ps command.=0A=0ACan you run this and then post the results= :=0A=0Aecho $WRAPPER_CMD=0Aecho `$PSEXE -ww -p $pid -o args`=0A=0AThat shou= ld make the cause clear.=0A=0ACheers,=0ALeif=0A=0AHorace Pinker wrote:=0A>= =0A> i ran into a simliar problem like mark leone some months ago: =0A> htt= p://www.nabble.com/Can%27t-make-old-wrapper-daemon-go-away-tf3346234.html#a= 9353225.=0A>=0A> however, i run the script on a fresh centos5 installation.= but just to =0A> be sure i added the -ww in my script, too.=0A>=0A> actual= ly i found that the getpid() function always leads to a deletion =0A> of th= e pid file, so i can not use the script to stop/status/restart a =0A> servi= ce.=0A>=0A> i put in some echo statements to narrow the problem.=0A>=0A> ha= ve a look at this code:=0A>=0A> ...=0A> pidtest=3D`$PSEXE -w= w -p $pid -o args | grep =0A> "$WRAPPER_CMD" | tail -1`=0A> echo "1"=0A> = echo `$PSEXE -ww -p $pid -o args`=0A> echo "2"=0A> = echo `$PSEXE -ww -p $pid -o args | grep "$WRAPPER_CMD"`=0A> echo "3"= =0A> echo `$PSEXE -ww -p $pid -o args | grep "$WRAPPER_CMD"= =0A> | tail -1`=0A> echo "4"=0A> echo "$pidtest"=0A> echo "4"=0A> = ....=0A>=0A> only between 1 and 2 there will be any output. in the moment t= he =0A> result of ps is piped to the grep command there is no longer any = =0A> output. so especially $pidtest ist empty which leads to a deletion of = =0A> the pid file and so the script does not work at all.=0A>=0A> any thoug= hts?=0A=0A=0A--------------------------------------------------------------= -----------=0AThis SF.net email is sponsored by: Microsoft=0ADefy all chall= enges. Microsoft(R) Visual Studio 2005.=0Ahttp://clk.atdmt.com/MRT/go/vse01= 20000070mrt/direct/01/=0A_______________________________________________=0A= Wrapper-user mailing lis...@li...=0Ahttps://li= sts.sourceforge.net/lists/listinfo/wrapper-user=0A=0A=0A=0A=0A=0A=0A=0A = =0A_____________________________________________________________________= _______________=0ALooking for a deal? Find great prices on flights and hote= ls with Yahoo! FareChase.=0Ahttp://farechase.yahoo.com/ |