Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"start()" command in the start/stop script #30

Open
ctmarc opened this issue Feb 25, 2021 · 0 comments
Open

"start()" command in the start/stop script #30

ctmarc opened this issue Feb 25, 2021 · 0 comments

Comments

@ctmarc
Copy link

ctmarc commented Feb 25, 2021

In files/glbd.sh on line 110-115 the start() command checks the exit code of the "pidof" statement. Shouldn't it check the exit code of the preceding "eval" statement instead? (edit -- maybe not but it didnt work in my alpine container)

Additionally, the statement pidof /usr/local/sbin/glbd (pidof $exec) returns a blank string instead of a pid, but pidof $prog returns a value. Actually it returns 2 PIDs, one of which is the executable and the second is the init script, but only the first should go into the .pid file.

I replaced lines 110-115 with the following and it seems to run well:

if ! eval $exec $GLBD_OPTIONS $LISTEN_ADDR $DEFAULT_TARGETS; then
   echo "[`date`] $prog: failed to start."
   exit 1
fi
PID=`pidof -o %PPID $prog`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant