$ sudo /sbin/service supervisord restart
Stopping supervisord: Shut down
Waiting roughly 60 seconds for /var/run/supervisord.pid to be removed after child processes exit
/etc/init.d/supervisord: line 61: last: unbound variable
-eq is comparing both as number, so "last" is considered as avariable name and then try to expand the value of the variable "last".
Should be =
# always remove the subsys. we might have waited a while, but just remove it at this point.
rm -f /var/lock/subsys/supervisord
So this logic is not reached and lock file is remaining as a result.
$ ls -lah /var/lock/subsys/supervisord
-rw-r--r-- 1 root root 0 Feb 14 13:21 /var/lock/subsys/supervisord
$ ps aux | grep supervisor
user 4546 0.0 0.0 103316 912 pts/0 S+ 13:27 0:00 grep supervisor
$ sudo /sbin/service supervisord status
unix:///var/run/supervisor.sock no such file
supervisord dead but subsys locked
Here is my environment I tested
$ cat /etc/redhat-release
CentOS release 6.10 (Final)
$ uname -r
2.6.32-754.6.3.el6.x86_64
$ bash --version
GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ /sbin/service --version
service ver. 0.91
$ supervisord -v
3.3.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-eq is comparing both as number, so "last" is considered as avariable name and then try to expand the value of the variable "last".
Should be =
# always remove the subsys. we might have waited a while, but just remove it at this point. rm -f /var/lock/subsys/supervisordSo this logic is not reached and lock file is remaining as a result.
Here is my environment I tested