diff --git a/startopenerp/README.md b/startopenerp/README.md new file mode 100644 index 0000000..573629c --- /dev/null +++ b/startopenerp/README.md @@ -0,0 +1,11 @@ +# Automatically run script at boot time +# Following are simple instructions +# Make /etc/rc.d/rc.local executable, by using this command: + chmod +x /etc/rc.d/rc.local +# Edit the file /etc/rc.local and to the bottom of it simply add the line pointing to your shell script: + /path/MyShScript.sh +# And then to make it executable, run: + chmod +x /path/MyShScript.sh +# DONE! + + diff --git a/startopenerp/startopenerp.sh b/startopenerp/startopenerp.sh new file mode 100755 index 0000000..639c409 --- /dev/null +++ b/startopenerp/startopenerp.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Stop OpenERP service +sudo service openerp stop +# Start OpenERP service +sudo su - openerp -c "cd /opt/bahmni-erp/ && nohup ./openerp-server --addons-path=/opt/bahmni-erp/bahmni-addons,/usr/lib/python2.6/site-packages/openerp-7.0_20130301_002301-py2.6.egg/openerp/addons &" +echo "OpenERP started" + +