./env/bin/gunicorn_start: 14: source: not found

I am new to django and following this video https://www.youtube.com/watch?v=Td3lirXIeRI

#!/bin/sh

NAME='project2'
DJANGODIR=/webapps/project2/project2
SOCKFILE=/webapps/project2/run/gunicorn.sock
USER=project2user
GROUP=webapps
NUM_WORKERS=3
DJANGO_SETTINGS_MODULE=project2.settings
DJANGO_WSGI_MODULE=project2.wsgi
TIMEOUT=120

cd $DJANGODIR
source ../env/bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH

RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR

exec ../env/bin/gunicorn ${DJANGO_WSGI_MODULE}:application \
--name $NAME \
--workers $NUM_WORKERS \
--timeout $TIMEOUT \
--user=$USER \
--group=$GROUP \
--bind=unix:$SOCKFILE\
--log-level=debug \
--log-file =-

Error

(env) root@ubuntu-s-1vcpu-2gb-nyc1-01:/webapps/project2# ./env/bin/gunicorn_start
./env/bin/gunicorn_start: 14: source: not found

File Structure

(env) root@ubuntu-s-1vcpu-2gb-nyc1-01:/webapps# cd project2
(env) root@ubuntu-s-1vcpu-2gb-nyc1-01:/webapps/project2# cd env
(env) root@ubuntu-s-1vcpu-2gb-nyc1-01:/webapps/project2/env# cd bin
(env) root@ubuntu-s-1vcpu-2gb-nyc1-01:/webapps/project2/env/bin# ls
Activate.ps1  activate.fish         bugscanner    fonttools       numpy-config  pyftmerge   python3.12
__pycache__   atm                   django-admin  gunicorn        pip           pyftsubset  sqlformat
activate      automium_web.bat      f2py          gunicorn_start  pip3          python      ttx
activate.csh  automium_web_pypi.py  flask         normalizer      pip3.12       python3
(env) root@ubuntu-s-1vcpu-2gb-nyc1-01:/webapps/project2/project2/project2# ls
__init__.py  __pycache__  asgi.py  requirements.txt  settings.py  settings_dev.py  urls.py  wsgi.py

Welcome @Starter !

The default shell in some distros is dash, which doesn’t support the source command. You should specify /bin/bash or some other shell supporting the source command.

Also, rather than trying to figure out the relative paths, I’d change the source statement to use the absolute path, /webapps/project2/env/bin/activate.

Thank you! Specifying /bin/bash solved the problem.