instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.43k stars 2.43k forks source link

`canvas_init`: Set shell (-s) - suppport limited system user #2150

Open JedMeister opened 1 year ago

JedMeister commented 1 year ago

Minor change to canvas_init so that it can also run under a limited system user account (that does not have a shell by default, or uses /bin/nologin or /bin/false).

Currently the service will fail to start if the user does not have a shell set.

As an aside, I would like to see a native systemd service. Even though systemd is ubiquitous these days, it wouldn't be unreasonable to keep this init.d script (e.g. for those few that might wish to use OpenRC - or something else). But a native canvas_init.service file would be preferable. I have personally noticed some weirdness (e.g. the system losing track of it's workers) with the init.d script unless used via systemd (i.e. if you /etc/init.d/canvas_init start, I found on most occasions if I follow that with systemctl status canvas_init it reports "failed" - but it's actually running).

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.