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

Supervise-daemon allow --wait argument for better conversion compatibility #673

Open
j4Hu opened this issue Nov 27, 2023 · 2 comments
Open
Assignees

Comments

@j4Hu
Copy link

j4Hu commented Nov 27, 2023

i am converting some existing services to use supervising daemon.

it is great when i can use only configuration files /etc/conf.d modifications. if i use /etc/init.d modifications, like in doc examples, it can lead to upgrade issues and more.

example of config modification to use supervise:

echo 'supervisor="supervise-daemon"
command_args_foreground="--nodaemonize"
' >>  /etc/conf.d/fcron

but most /etc/init.d scripts use of --wait argument, to wait for pid file.

example:

/etc/init.d/php-fpm:start_stop_daemon_args="--wait 5000 ${PHP_FPM_UMASK:+--umask ${PHP_FPM_UMASK}}"

/etc/init.d/fcron:start_stop_daemon_args=${FCRON_SSDARGS:-"--wait 1000"}

supervise does not need pid file creation by init.d program, and practically dont need to wait.
so it does not support --wait argument, and throws error:

unrecognized option '--wait'
DAEMON                  |Usage: supervise-daemon [options]

i think it will be great to supervise-deamon accept --wait argument, without error.
maybe with einfo that wait will be always zero.

tnx

@navi-desu
Copy link
Member

looking at the examples, i really don't know why start_stop_daemon_args are being used for supervise_daemon at all, as you can see both set args for ssd, those args shouldn't carry over, and that's the bug

@navi-desu navi-desu self-assigned this Nov 2, 2024
@navi-desu
Copy link
Member

a possible temporary fix is to just do supervise_daemon_args= on the conf.d, which should disable the fallback

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

2 participants