Hello. Why do you try to parse the text return of the command ?
You have to use the return code for this : * $? -eq 0 : OK, nginx running * $? -ne 0 : NOK, nginx not running Parsing the text return is completely non-sense and will give you tons of headches everytime there's a change in the initscript. Thanks. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1023389 Title: "service nginx status" is confusing when nginx is not running To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1023389/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs