Merge lp:~roadmr/capomastro/init-papercuts into lp:capomastro
Proposed by
Daniel Manrique
Status: | Merged |
---|---|
Approved by: | Caio Begotti |
Approved revision: | 200 |
Merged at revision: | 198 |
Proposed branch: | lp:~roadmr/capomastro/init-papercuts |
Merge into: | lp:capomastro |
Diff against target: |
36 lines (+8/-7) 1 file modified
debian/capomastro.init (+8/-7) |
To merge this branch: | bzr merge lp:~roadmr/capomastro/init-papercuts |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Caio Begotti (community) | Approve | ||
Review via email: mp+261453@code.launchpad.net |
Commit message
Return proper error codes in the initscript. Invoke start-stop-daemon with proper PID.
Description of the change
Fixes for two tiny capomastro initscript bugs.
To post a comment you must log in.
Daniel, thanks for these changes! I marked it as Needs Fixing simply because when I was testing the changes I noticed the start command would always return 0 still spawning rogues processes because of a bogus pgrep check (pgrep actually should be checking for python2.7 not celery, but that would be stupid so it's just easier to list all processes owned by the capomastro user). Can you incorporate this diff in your branch please? Otherwise your MR looks good so thanks again :-)
=== modified file 'debian/ capomastro. init' capomastro. init 2015-04-27 18:25:17 +0000 capomastro. init 2015-06-09 13:18:58 +0000
--- debian/
+++ debian/
@@ -54,7 +54,7 @@
if [ -f ${PIDFILE} ]; then
start-stop- daemon -b --start --quiet -m --user ${NAME} --pidfile ${PIDFILE} --chuid ${NAME} --exec ${DAEMON} -- ${DAEMON_ARGS} || return 2
curpid=$(cat ${PIDFILE})
- if pgrep celery | grep -q ${curpid}; then
+ if pgrep -u capomastro | grep -q ${curpid}; then
return 0
else