Hello,
I am having an issue with Anope 1.9.7 (and 1.9.6) with respect to cron.
If i run the services.chk script myself from a terminal, everything is fine, the binary runs and returns control to the terminal:
~/services/data$ ./services.chk
Anope 1.9.7, build #4, compiled 08:05:03 Jan 16 2013
Using configuration file conf/services.conf
Attempting to connect to uplink #1 XX.XX.XX.XX (XX.X.XX.XX), port XXXX
Successfully connected to uplink #1 XX.XX.XX.XX:XXXX
Successfully linked, launching into background...
However, if I allow cron to run the script, it never reaches the "launching into background" portion. Logging cron produces:
~/services/data$ ./services.chk
Anope 1.9.7, build #4, compiled 08:05:03 Jan 16 2013
Using configuration file conf/services.conf
Attempting to connect to uplink #1 XX.XX.XX.XX (XX.X.XX.XX), port XXXX
Successfully connected to uplink #1 XX.XX.XX.XX:XXXX
The result of this is an anope process, along with 2 other processes:
5537 ? Ss 0:00 /bin/sh -c /home/XXXX/services/data/services.chk > /
5539 ? S 0:00 /bin/sh /home/XXXX/services/data/services.chk
5540 ? S 0:00 ./services
This leads me to believe there is something going on with services returning control to the calling script. I whipped up another bash script to echo text before and after the services.chk script runs, and ONLY when called via cron, the final "Done" echo, never gets logged. So I'm pretty convinced the services binary doesn't properly return control (and launch into the background) when called by cron. I can't fathom why this would be.
Hopefully somebody has an idea.