1833527 Members
2913 Online
110061 Solutions
New Discussion

Re: script question

 
SOLVED
Go to solution
tom quach_1
Super Advisor

script question

Dear all,

hpux 11.31 Itanium
This scripts run when the server start
i need to change DIR to /users/lee/listner
and run as :
./startall
this is vendor's script and it won't run as
/users/lee/listner/startall even from a command line.

how can i do that between the quotation marks?

case "$1" in
'start')
#startup Imaxsoft
/bin/su - lee -c "/users/lee/listner/startall"

.......

Thanks in advance.
Tom
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: script question

Shalom Tom,

Make sure the script has execute permissions.

Yes as shown it should run fine.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor
Solution

Re: script question

Hi Tom:

> this is vendor's script and it won't run as
/users/lee/listner/startall even from a command line.

That makes little sense. What does it do? Does is actually run and return an error?

# /bin/su - lee -c "cd /users/lee/listner && ./startall"

Regards!

...JRF...

tom quach_1
Super Advisor

Re: script question

Thanks Steven & James.

James, your solution works great.

Thanks for your helps.
Regards,
Tom