I'm trying to configure the celery worker as a daemon as per Running the worker as a daemon.
Even though I work directly from root I can't run the service since the $EUID is empty and thus the condition
if [ "$EUID" != "0" ]; then
echo "Error: This program can only be used by the root user."
exit 1
fi
is always true.
This happens only when I try to run the service.
echo $EUID
in the console naturally prints 0.
What's the reason of this behavior? How to solve it to make the celery worker run as a daemon?
Thanks in advance.