What if, instead of calling the script, just calling the line that's in the script?
su - quas -c '/VM_INF/qas/proweb/apps/qaswvd &'
The item that you linked to is slightly different to my case. I am trying to su and then run the start script; rather than trying to run a script that contains an su.
The thing that beats me is that I can run the command if I telnet to the servers as root, but if the same command is run as an External Command within a BL package it starts OK but then stops again.
We've encountered this problem before. The issue is the closure of filehandles by the NSH/rscd call before the process has completed initialization. Throw a "sleep 3" either into the end of the script or via ; on the CLI call and it should be happier. In some cases we've also had to call the daemonizing app with "nohup" just to cover the off case of an errant signal.
I had some problems with this the oracle install.
If you run oracle install, then it returns immediately.
so, I put the oracle installer into a script that looked like this:
su oracle -c "./runInstaller -silent -responsefile /var/tmp/standard.rsp"
while `ps -fu oracle; do
echo Waiting for `ps -fu oracle|wc -l` processes to go down to 1 processes
This waited until all Oracle processes died. This makes the assumption that no oracle processes are already running (A safe assumption in this case, as the oracle account was created earlier in the install).