0

I am a newbie to centos commands and scripting.

Scenario: I have installed ERPNEXT and is working okay on the server but I have to do it manually by doing ./lib/wnfy.py --serve

What I want to do is to start it automatically using supervisord. I have gunicorn and nginx installed. Upon trying to start supervisord here's the error:

[root@vps3 etc]# chkconfig supervisord on [root@vps3 etc]# service supervisord start /etc/init.d/supervisord: line 11: ./etc/rc.d/init.d/functionsprog=supervisord: No such file or directory Starting : daemon --pidfile [ -f ]/etc/init.d/supervisord: line 14: success: command not found /etc/init.d/supervisord: line 14: failure: command not found

I am not yet familiar with how things work. Please advise. Thanks in advance.

Philip Allgaier
  • 3,505
  • 2
  • 26
  • 53

1 Answers1

0

Have you installed supervisor? Follow,

Install supervisor

Initscripts (use jkoppe ones).

Also for production setup, use gunicorn. Supervisor config for it is,

    [program:gunicorn]
    command=gunicorn -b 127.0.0.1:8000 -w 2 -t 120 lib.webnotes.app:application
    directory=/path/to/erpnext
    user=erpnext
    process_name=%(program_name)s
    autostart=True
    autorestart=True
    redirect_stderr=True
pdvyas
  • 76
  • 5