> Потом оказалось надо юзера группу нужный выставить для демона, перед запуском дождаться хотя бы сервера баз данных, ибо оттуда надо скачать данные перед запуском, нехило было бы подождать веб-сервер, потому что демон шлёт туда по http данные.Мне кажется кто-то люто пиzдит. Зависимости в init-скриптах через Required-Start/Stop уже тыщщу лет были, а плюшки запуска процессов обеспечиваются через стандартный start-stop-daemon:
DESCRIPTION
start-stop-daemon is used to control the creation and termination of system-level processes. Using one of the matching options, start-stop-daemon can be
configured to find existing instances of a running process.
Generic options
-g, --group group|gid
Change to group or gid when starting the process.
-c, --chuid username|uid[:group|gid]
Change to this username/uid before starting the process. You can also specify a group by appending a :, then the group or gid in the same way as
you would for the chown(1) command (user:group). If a user is specified without a group, the primary GID for that user is used. When using this
option you must realize that the primary and supplemental groups are set as well, even if the --group option is not specified. The --group option
is only for groups that the user isn't normally a member of (like adding per process group membership for generic users like nobody).
-b, --background
Typically used with programs that don't detach on their own. This option will force start-stop-daemon to fork before starting the process, and
force it into the background. Warning: start-stop-daemon cannot check the exit status if the process fails to execute for any reason. This is a
last resort, and is only meant for programs that either make no sense forking on their own, or where it's not feasible to add the code for them to
do this themselves.
-m, --make-pidfile
Used when starting a program that does not create its own pid file. This option will make start-stop-daemon create the file referenced with
--pidfile and place the pid into it just before executing the process. Note, the file will only be removed when stopping the program if
--remove-pidfile is used. Note: This feature may not work in all cases. Most notably when the program being executed forks from its main process.
Because of this, it is usually only useful when combined with the --background option.