[freeside-users] How can I read exit status with custom shellcommands export?

Ivan Kohler ivan at freeside.biz
Thu Dec 18 18:09:01 PST 2008


Output your error on STDERR, not STDOUT.  Exit status is not used.

It is not necessary to replicate the useradd command; that's why the 
commands are configurable.

-- 
_ivan


On Wed, Dec 10, 2008 at 09:31:57AM -0800, Cal wrote:
> I have a command line PHP script that I am using to add users to google apps.
> 
> 
> 
> 
> I tried to make the script look and act as much like useradd as
> possible. It uses the same option formatting and even exits with the
> same exit status as useradd would on errors. However, even failed
> commands appear to Freeside as successful and as such we get no error
> reporting.
> 
> 
> 
> 
> 
> I have even gone as far as to make every error exit with status 9 and the error message "useradd: user ing123 exists" 
> 
> 
> 
> 
> 
> I have verified on the command line that the exit status is indeed greater than 0 when errors occur.  
> 
> 
> 
> 
> 
> Can someone please give me a clue as to what I am doing wrong?
> 


More information about the freeside-users mailing list