From: Matteo Nastasi Date: Sun, 13 Sep 2026 10:39:48 +0000 (+0200) Subject: the init script could not start the daemon X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=55998bf889c21da8ffaf144d64cf06f00aa1af17;p=brisk.git the init script could not start the daemon "su - www-data" answers "This account is currently not available": the system user that runs the daemon has /usr/sbin/nologin as its shell, and that is the case for www-data on debian. The init script used it in both start branches, start and devstart, so the service did not start at all. "-s /bin/bash" is passed to the two su. It is the bare minimum: giving the system user a real shell would be the wrong fix. Checked in the debian 13 container: installed with "INSTALL.sh system", enabled with systemctl (systemd accepts LSB scripts through systemd-sysv-install), and after a restart of the container the daemon, nginx and postgresql come back up by themselves, with the site answering on 80 and 443. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE --- diff --git a/bin/brisk-init.sh b/bin/brisk-init.sh index f816cb4..e958057 100755 --- a/bin/brisk-init.sh +++ b/bin/brisk-init.sh @@ -13,6 +13,10 @@ PPATH="xx/home/nastasi/brisk-priv" # screen suffix SSUFF="xxbrisk" BUSER="xxwww-data" +# NOTE: the two "su" below pass "-s /bin/bash". The system user that runs the +# daemon usually has /usr/sbin/nologin as its shell (that is the case for +# www-data on debian), and without this "su - www-data" answers "This account +# is currently not available" and the daemon does not start. # seconds to wait exit of the process WAITLOOP_MAX=5 @@ -48,11 +52,11 @@ case "$1" in ;; devstart) - su - ${BUSER} -c 'cd '"$BPATH"'/spush ; ./brisk-spush.php' + su -s /bin/bash - ${BUSER} -c 'cd '"$BPATH"'/spush ; ./brisk-spush.php' ;; start) - su - ${BUSER} -c 'cd '"$BPATH"'/spush ; screen -d -m -S '"${SSUFF}"' bash -c '"'"'while [ 1 ]; do cd . ; ./brisk-spush.php \| grep "IN LOOP" ; if [ $? -eq 0 ]; then break ; fi ; done'"'" + su -s /bin/bash - ${BUSER} -c 'cd '"$BPATH"'/spush ; screen -d -m -S '"${SSUFF}"' bash -c '"'"'while [ 1 ]; do cd . ; ./brisk-spush.php \| grep "IN LOOP" ; if [ $? -eq 0 ]; then break ; fi ; done'"'" ;; restart) $0 stop