Bench doesn't start automatically even on production server

i just setup my bench production server but i still have to manually start bench every time i log in. Isn’t bench supposed to start automatically in production environment?
using ubuntu 16.04.1 LTS

bench start is the developer setup

Yeah I know. But I still have to do it in production environment. That’s
the problem. Is there a delay between log in and server start?

having the same issue

Does ubuntu 16.04.1 LTS use systemd so for eg follow this -

For Ubuntu 14.04 that uses upstart I followed this:

Here is my startup script:

frappe@erpnext:~/frappe-bench$ find /etc/init -name erpnext.conf
/etc/init/erpnext.conf

# erpnext - Ubuntu 14.04 hosted as kvm-qemu vm guest running on Centos 7
#
# supervisorctl manages startup of mysql & nginx along with wsgi web server gunicorn worker          processes & redis queue/cache that erpnext needs to run.
#
 description     "startup up ERPNext instance on system boot"

start on runlevel [2345]
stop on runlevel [!2345]

expect fork
respawn

pre-start script
  echo  echo "[`date`] ERPNext Starting up..." >> /var/log/erpnext.log
end script

script
   exec sudo supervisorctl start
   echo  echo "[`date`] ERPNext Started" >> /var/log/erpnext.log
end script

pre-stop script
   echo  echo "[`date`] ERPNext Shutting down..." >> /var/log/erpnext.log
   exec sudo supervisorctl stop
   echo  echo "[`date`] ERPNext Stopped" >> /var/log/erpnext.log
end script
2 Likes

i am using ubuntu 16 i am facing many difficulties on this can you please support?

Hi what seems to be the problem Dany?

Have your searched this forum and not found any answers or ideas?

so we still have to use this script in 2019? or it should start automatically?

1 Like

erpnext auto start,