"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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE
# 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
;;
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