Re: <on-connect> / <on-disconnect> not working
Petr Pisar <[email protected]>
| Newsgroups | gmane.comp.audio.icecast.general |
|---|---|
| Message-ID | <[email protected]> |
V Fri, Jul 15, 2022 at 06:47:56AM -0700, Jack Elliott napsal(a):
> [pid 20995] execve("/home/my_username/bin/email_onconnect.sh", ["/home/my_username/bin/email_onconnec"..., "/stream"], [/* 5 vars */]) = 0
Here email_onconnect.sh is successfully executed (return value 0). Though, it
does not mean that the script won't fail later. Just that the script has
started.
> [pid 20996] execve("/usr/bin/msmtp", ["msmtp", "my_address@org"], [/* 7 vars */]) = 0
Here email_onconnect.sh executed msmtp program.
> [pid 20996] +++ exited with 78 +++
Here msmtp program termined with an exit code 78.
> [pid 20995] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20996, si_uid=112, si_status=78, si_utime=0, si_stime=1} ---
Here email_onconnect.sh program received a signal that msmtp exited with
details about msmtp exit: It was a regular exit (not a crash), it was running
as user ID 112 and the exit code was 78.
> [pid 20995] +++ exited with 78 +++
Here the exit code is propaged up to a parent process. Probably msmtp was
the last command in email_onconnect.sh.
What does it mean? It means that Icecast successfully executed your
email_onconnect.sh script. But msmtp failed with exit code 78.
I don't know msmtp tool. Its documentation does not explains exit codes
much <https://marlam.de/msmtp/msmtp.html#Exit-code>. It only referes to
sysexits.h header file. That file does not exist in msmtp sources, it seems to
be copied from gnulib sources
<https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/sysexits.in.h;h=9a65060ee695eb93a8adbf3e329f1e5df3fcdbbc;hb=HEAD>.
There you can read:
# define EX_CONFIG 78
Gnulib documentation does not explain what EX_CONFIG means. Searching Internet
discloses a similar header file <https://gist.github.com/bojanrajkovic/831993>
from BSD which is more verbose:
#define EX_CONFIG 78 /* configuration error */
So very probably msmtp tool tries to report an error in a configuration.
I recommend you to study msmtp documentation to know how to enable logging in
msmtp and where to read the log. Debian has a brief introduction
<https://wiki.debian.org/msmtp>. You probably want to set "logfile" option to
a writable file and then watch what will emerge in that file.
You could also log standard output and error output of msmtp command in your
email_onconnect.sh script. Like this:
msmtp "my_address@org" >/tmp/log 2>&1
Maybe you will find something interesting.
-- Petr
_______________________________________________
Icecast mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/icecast
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE4/QvzhVoMKgDWObpT9GuwzZa978FAmLRp28ACgkQT9GuwzZa 97/W+BAAuC+Nth+vdV0E88QcgFbDh4lgtW7m6O5FTAuScpP1beGS7wGNNeOanqg2 2soSBSAjh0MZob2+pm8nTeKGg5Nv3p0BflaFRdFL1iZQwXS65cJx0AZI2or9pBlZ Y48Q+c4abATmG2QCSrjKjzhb25WdUKk1ckho1tRDWkxXrbeIM4dtWKp2uNtWlDpA 4dA8QRmUcNhTPIr4qSB+4kzCovWbk3Nu1b2joa8YLpmi3xadj4RNR2Ek8qX6GzZ5 jYUWfoJtuFk6cqByABtIX4ST2AsdgiIfrp0IDhhCH+9OrHrsUZBY8PySF/A8Ktog DJQUk0vAamry4NhtOpHrgmMFuqxZVYBzINk4ZYLeGkk1fYSBR4VXxXZsYTI+IKwj PsiqDWWw5ztfMgtqdkttOwf6f2X9DQNJTDPLb0M/1NAXue1L8vJGOdqi7m0VBNYN QzP5mFqwC8gav6zAr0fVz94/R9ishUSaKH/3KRpYdJnmR90+WZDla2qLNq1Onrm3 HtSH/D7mDwp7+pfH4PmgDFZP5Hfy1VuSlkmd4lICGqZ/4tbQSGgoZ/pqG7SM79Ii u4478n0F7JxboiXW4mNWIwzOwBhpY3KO22vaX5QiROk5LW1ToFTW51TPrfMqeKa1 2MCSH80pEy/dy6AJKMExGt3bKd1NGlMgPCVRjOLIRn4QylU9nvE= =E6OP -----END PGP SIGNATURE-----