PID=$(sed -n 's/^\s*pid\s\s*\([^;]*\).*/\1/p' /etc/nginx/nginx.conf)

works for the three testcases shown in this and linked bugs.

not sure why I cant use \s+ after pid in the expression above, but it
works this way.


** Bug watch added: Debian Bug tracker #747329
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747329

** Also affects: nginx (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747329
   Importance: Unknown
       Status: Unknown

** Tags removed: needs-upstream-report

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1314740

Title:
  init script pid parsing has failure cases

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1314740/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to