Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: mahesaina on July 28, 2011, 06:06:45 PM
-
Hi,
i use smeserver 7.5.1,
and when i execute "signal-event user-modify accountKey" from shell
the exit status is 1.
but when i use server-manager for modify the user,
the report status is success.
Can anyone help me how to modify from shell?
-
and when i execute "signal-event user-modify accountKey" from shell
the exit status is 1.
Search for '|Status|' in /var/log/messages and you will identify which script or scripts in the user-modify event returned an error status, and you should also see some diagnostic messages as to what the error was.
-
Dear Charlie,,
i already check my /var/log/messages*, but i found no errors.
if execute directly from shell, no error message.
only occurs when i execute in the background, always give exit status 1.
have any idea?
Thanks.
-
Dear Charlie,,
i already check my /var/log/messages*, but i found no errors.
if execute directly from shell, no error message.
only occurs when i execute in the background, always give exit status 1.
have any idea?
Thanks.
please, define "I execute in the background", thank you
-
signal-event user-modify keyaccount &
then the exit status is 1.
Thanks.
-
only occurs when i execute in the background, ...
Don't do that. You should wait until the command completes.
-
I still get the exit status = 1,
when using the script:
Unless (system ("signal-event user-modify $ keyaccount") == 0) {
die "exit status 1";
}
-
Unless (system ("signal-event user-modify $ keyaccount") == 0) {
die "exit status 1";
}
Is the space between the $ and keyaccount the actual code or is that just a typo?
-
I still get the exit status = 1,
when using the script:
Unless (system ("signal-event user-modify $ keyaccount") == 0) {
die "exit status 1";
}
Here you are printing '1' instead of the actual exit status of 'signal-event'. And you have a space between $ and keyaccount. 'unless' is a perl keyword, but 'Unless' is not.
Use instead:
die "signal-event returned non-zero" unless (system('signal-event', 'user-modify', '$keyaccount') == 0);
Use either:
'$keyaccount'
or
$keyaccount
depending on whether you wanted variable interpolation or literal '$keyaccount'.
Read 'man perlsec' (or http://perldoc.perl.org/perlsec.html).
Be sure to always check log files when you get an error from signal-event.
I'm bowing out now - this forum isn't intended to be a programming tutorial.