Created attachment 292021 [details] emerge --info Hi, apache2.2.21 got an issue in its latest init.d script regarding the restart function. server ~ # /etc/init.d/apache2 restart * Caching service dependencies ... [ ok ] * Stopping apache2 ... [ ok ] * Starting apache2 ... * start-stop-daemon: /usr/sbin/apache2 is already running [ ok ] It boils down to this line in the initscript: /etc/init.d/apache2: 78 start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start If I change it to '${APACHE2} ${APACHE2_OPTS} -k start' it works as expected.
confirmed. My workaround is stopping apache, waiting a second or two and then starting it...
Created attachment 293073 [details, diff] Diff for /etc/init.d/apache2 The while loop condition in stop() was wrong. The loop should continue as long as the PID file still exist, the apache2 PID is still running, and the timeout value hasn't been exceeded yet.
(In reply to comment #2) > Created attachment 293073 [details, diff] [details, diff] > Diff for /etc/init.d/apache2 Excellent. WORKSFORMETHX ;)
We also have a workaround in bug 388009, but I'm honestly not sure which one is best to apply.
That bug is there for months now and there's still no fix for it in portage..
The fix from Sok Ann Yap is definately the right one. Hey Apache Maintainers, please apply the Patch to Portage! Thank you..
The fix from Sok Ann Yap works perfectly and changes only a single line by 2 characters. Given this complexity, I guess we can expect to get this patch through QA by 2014 at the latest and into portage by 2017.
bump..
Yes, patch from Sok Ann Yap is working perfectly. Apache Maintainers, please apply it into Portage! I think you have enough time to prove it in last 4 months...
same problem here, same fix, initscript not working is an important problem, should have been fixed very fast, problem still here 3 months later . . .
+1 Had this problem, removed the ! on line 105, problem solved...
(In reply to comment #2) > Created attachment 293073 [details, diff] [details, diff] > Diff for /etc/init.d/apache2 The patch works great, thank you! Why can't this small change be applied to portage?
*** Bug 396173 has been marked as a duplicate of this bug. ***
pva/apache maintainers, could this please get fixed? It's pretty annoying. Or just +1 and I'll just commit the patch to all init scripts for you.
+ 28 Mar 2012; Patrick Lauer <patrick@gentoo.org> +apache-2.2.22.ebuild: + Bump for #401761. init script fix for #389965
Created attachment 307589 [details, diff] Diff for apach2.initd Still getting this problem. "test -f "${PIDFILE}" is false but "pgrep -P ${PID} apache2" still shows some apache processes. I think it's better to use only "pgrep -P ${PID} apache2" as condition in init.d/apache2:105 Here is my diff