diff --git a/Openelis_war/openelis.war b/Openelis_war/openelis.war new file mode 100644 index 0000000..4a61a07 Binary files /dev/null and b/Openelis_war/openelis.war differ diff --git a/Openmrs_Modules/addresshierarchy-2.12.0-SNAPSHOT.omod b/Openmrs_Modules/addresshierarchy-2.12.0-SNAPSHOT.omod new file mode 100644 index 0000000..77ec36c Binary files /dev/null and b/Openmrs_Modules/addresshierarchy-2.12.0-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/appframework-2.10.0.omod b/Openmrs_Modules/appframework-2.10.0.omod new file mode 100644 index 0000000..5ed33d7 Binary files /dev/null and b/Openmrs_Modules/appframework-2.10.0.omod differ diff --git a/Openmrs_Modules/appointments-1.1-SNAPSHOT.omod b/Openmrs_Modules/appointments-1.1-SNAPSHOT.omod new file mode 100644 index 0000000..ab866c6 Binary files /dev/null and b/Openmrs_Modules/appointments-1.1-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/auditlog-1.1-SNAPSHOT.omod b/Openmrs_Modules/auditlog-1.1-SNAPSHOT.omod new file mode 100644 index 0000000..7d1ab0f Binary files /dev/null and b/Openmrs_Modules/auditlog-1.1-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/bacteriology-1.1.omod b/Openmrs_Modules/bacteriology-1.1.omod new file mode 100644 index 0000000..d39d71d Binary files /dev/null and b/Openmrs_Modules/bacteriology-1.1.omod differ diff --git a/Openmrs_Modules/bahmni.ie.apps-0.91-SNAPSHOT.omod b/Openmrs_Modules/bahmni.ie.apps-0.91-SNAPSHOT.omod new file mode 100644 index 0000000..b47a5f3 Binary files /dev/null and b/Openmrs_Modules/bahmni.ie.apps-0.91-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/bahmnicore-omod-0.91-SNAPSHOT.omod b/Openmrs_Modules/bahmnicore-omod-0.91-SNAPSHOT.omod new file mode 100644 index 0000000..a91884a Binary files /dev/null and b/Openmrs_Modules/bahmnicore-omod-0.91-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/bedmanagement-5.10.0.omod b/Openmrs_Modules/bedmanagement-5.10.0.omod new file mode 100644 index 0000000..8074875 Binary files /dev/null and b/Openmrs_Modules/bedmanagement-5.10.0.omod differ diff --git a/Openmrs_Modules/calculation-1.2.omod b/Openmrs_Modules/calculation-1.2.omod new file mode 100644 index 0000000..38aff4e Binary files /dev/null and b/Openmrs_Modules/calculation-1.2.omod differ diff --git a/Openmrs_Modules/emrapi-1.28.0-SNAPSHOT.omod b/Openmrs_Modules/emrapi-1.28.0-SNAPSHOT.omod new file mode 100644 index 0000000..706c5fb Binary files /dev/null and b/Openmrs_Modules/emrapi-1.28.0-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/episodes-1.0-SNAPSHOT.omod b/Openmrs_Modules/episodes-1.0-SNAPSHOT.omod new file mode 100644 index 0000000..2920e6e Binary files /dev/null and b/Openmrs_Modules/episodes-1.0-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/event-2.5.omod b/Openmrs_Modules/event-2.5.omod new file mode 100644 index 0000000..5cc670c Binary files /dev/null and b/Openmrs_Modules/event-2.5.omod differ diff --git a/Openmrs_Modules/htmlwidgets-1.8.0.omod b/Openmrs_Modules/htmlwidgets-1.8.0.omod new file mode 100644 index 0000000..17123a8 Binary files /dev/null and b/Openmrs_Modules/htmlwidgets-1.8.0.omod differ diff --git a/Openmrs_Modules/idgen-4.4.1.omod b/Openmrs_Modules/idgen-4.4.1.omod new file mode 100644 index 0000000..fe87211 Binary files /dev/null and b/Openmrs_Modules/idgen-4.4.1.omod differ diff --git a/Openmrs_Modules/idgen-webservices-1.2-SNAPSHOT.omod b/Openmrs_Modules/idgen-webservices-1.2-SNAPSHOT.omod new file mode 100644 index 0000000..b64a3c3 Binary files /dev/null and b/Openmrs_Modules/idgen-webservices-1.2-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/initializer-1.2.0-SNAPSHOT.omod b/Openmrs_Modules/initializer-1.2.0-SNAPSHOT.omod new file mode 100644 index 0000000..b62bae6 Binary files /dev/null and b/Openmrs_Modules/initializer-1.2.0-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/legacyui-1.3.3.omod b/Openmrs_Modules/legacyui-1.3.3.omod new file mode 100644 index 0000000..bfc5e92 Binary files /dev/null and b/Openmrs_Modules/legacyui-1.3.3.omod differ diff --git a/Openmrs_Modules/metadatamapping-1.3.1.omod b/Openmrs_Modules/metadatamapping-1.3.1.omod new file mode 100644 index 0000000..5852f84 Binary files /dev/null and b/Openmrs_Modules/metadatamapping-1.3.1.omod differ diff --git a/Openmrs_Modules/metadatasharing-1.2.2.omod b/Openmrs_Modules/metadatasharing-1.2.2.omod new file mode 100644 index 0000000..d9ccc95 Binary files /dev/null and b/Openmrs_Modules/metadatasharing-1.2.2.omod differ diff --git a/Openmrs_Modules/openelis-atomfeed-client-0.91-SNAPSHOT.omod b/Openmrs_Modules/openelis-atomfeed-client-0.91-SNAPSHOT.omod new file mode 100644 index 0000000..9bf8935 Binary files /dev/null and b/Openmrs_Modules/openelis-atomfeed-client-0.91-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/openmrs-atomfeed-2.5.6.omod b/Openmrs_Modules/openmrs-atomfeed-2.5.6.omod new file mode 100644 index 0000000..fb3150a Binary files /dev/null and b/Openmrs_Modules/openmrs-atomfeed-2.5.6.omod differ diff --git a/Openmrs_Modules/operationtheater-1.2.1.omod b/Openmrs_Modules/operationtheater-1.2.1.omod new file mode 100644 index 0000000..942445a Binary files /dev/null and b/Openmrs_Modules/operationtheater-1.2.1.omod differ diff --git a/Openmrs_Modules/owa-1.9.0.omod b/Openmrs_Modules/owa-1.9.0.omod new file mode 100644 index 0000000..b929488 Binary files /dev/null and b/Openmrs_Modules/owa-1.9.0.omod differ diff --git a/Openmrs_Modules/providermanagement-2.5.0.omod b/Openmrs_Modules/providermanagement-2.5.0.omod new file mode 100644 index 0000000..987361b Binary files /dev/null and b/Openmrs_Modules/providermanagement-2.5.0.omod differ diff --git a/Openmrs_Modules/reference-data-0.91-SNAPSHOT.omod b/Openmrs_Modules/reference-data-0.91-SNAPSHOT.omod new file mode 100644 index 0000000..c7df746 Binary files /dev/null and b/Openmrs_Modules/reference-data-0.91-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/reporting-1.16.0.omod b/Openmrs_Modules/reporting-1.16.0.omod new file mode 100644 index 0000000..5c7371c Binary files /dev/null and b/Openmrs_Modules/reporting-1.16.0.omod differ diff --git a/Openmrs_Modules/reportingrest-1.10.0.omod b/Openmrs_Modules/reportingrest-1.10.0.omod new file mode 100644 index 0000000..b415621 Binary files /dev/null and b/Openmrs_Modules/reportingrest-1.10.0.omod differ diff --git a/Openmrs_Modules/rulesengine-0.91-SNAPSHOT.omod b/Openmrs_Modules/rulesengine-0.91-SNAPSHOT.omod new file mode 100644 index 0000000..1f1b050 Binary files /dev/null and b/Openmrs_Modules/rulesengine-0.91-SNAPSHOT.omod differ diff --git a/Openmrs_Modules/serialization.xstream-0.2.12.omod b/Openmrs_Modules/serialization.xstream-0.2.12.omod new file mode 100644 index 0000000..72a733b Binary files /dev/null and b/Openmrs_Modules/serialization.xstream-0.2.12.omod differ diff --git a/Openmrs_Modules/uicommons-2.0.omod b/Openmrs_Modules/uicommons-2.0.omod new file mode 100644 index 0000000..6aa74a9 Binary files /dev/null and b/Openmrs_Modules/uicommons-2.0.omod differ diff --git a/Openmrs_Modules/uiframework-3.8.omod b/Openmrs_Modules/uiframework-3.8.omod new file mode 100644 index 0000000..d48c7fe Binary files /dev/null and b/Openmrs_Modules/uiframework-3.8.omod differ diff --git a/Openmrs_Modules/uilibrary-2.0.5.omod b/Openmrs_Modules/uilibrary-2.0.5.omod new file mode 100644 index 0000000..8bbae95 Binary files /dev/null and b/Openmrs_Modules/uilibrary-2.0.5.omod differ diff --git a/Openmrs_Modules/webservices.rest-2.25.0-SNAPSHOT.193a64.omod b/Openmrs_Modules/webservices.rest-2.25.0-SNAPSHOT.193a64.omod new file mode 100644 index 0000000..0164e7a Binary files /dev/null and b/Openmrs_Modules/webservices.rest-2.25.0-SNAPSHOT.193a64.omod differ diff --git a/deletePatientData/deletePatientData.sh b/deletePatientData/deletePatientData.sh new file mode 100755 index 0000000..178cf1e --- /dev/null +++ b/deletePatientData/deletePatientData.sh @@ -0,0 +1,80 @@ +#GITHUB_URL="https://raw.githubusercontent.com/Bahmni/bahmni-scripts/master/deletePatientData/0.91" + +OPENMRS_SQL_FILE="deletePatientDataForOpenMRS.sql" +OPENELIS_SQL_FILE="deletePatientDataForOpenElis.sql" +OPENERP_SQL_FILE="deletePatientDataForOpenERP.sql" +CURDIR=$(pwd) + + +RED='\033[0;31m' +GREEN='\033[0;32m' +CYAN='\033[0;36m' +NOCOLOR='\033[0m' + +stop_all_bahmni_services() +{ + + echo -e "${CYAN}Stopping all bahmni related services${NOCOLOR}" + bahmni -i $INVENTORY_FILE stop + +} + +download_and_delete_openmrs_patient_data(){ + echo -e "${CYAN}downloading openmrs delete patient data sql file${NOCOLOR}" + if [ -z $OPENMRS_DB_USER ];then + echo -e "${RED}OPENMRS_DB_USER is unset.Please set the ENVIRONMENT VARIABLE OPENMRS_DB_USER ${NOCOLOR}" + else + echo -e "${CYAN} deleting openmrs patient data${NOCOLOR}" + mysql -u$OPENMRS_DB_USER -p$PASSWORD openmrs < $OPENMRS_SQL_FILE + exitcode=$? + if [ $exitcode -ne 0 ]; then + echo -e "${RED}Failed to delete the openmrs patient data${NOCOLOR}" + else + echo -e "${GREEN} Successfully deleted the openmrs patient data${NOCOLOR}" + fi + fi +} + +download_and_delete_openelis_patient_data(){ + echo -e "${CYAN}downloading openelis delete patient data sql file${NOCOLOR}" + if [ -z "$OPENELIS_DB_USER" ]; + then echo -e "${RED}OPENELIS_DB_USER is unset. Please set the ENVIRONMENT VARIABLE OPENELIS_DB_USER${NOCOLOR}" + else + echo -e "${CYAN}deleting openelis patient data ${NOCOLOR}" + psql -U$OPENELIS_DB_USER clinlims < $OPENELIS_SQL_FILE + exitcode=$? + if [ $exitcode -ne 0 ]; then + echo -e "${RED}Failed to delete the openelis patient data${NOCOLOR}" + else + echo -e "${GREEN} Successfully deleted the openelis patient data${NOCOLOR}" + fi + fi +} + +download_and_delete_openerp_patient_data(){ + echo -e "${CYAN}downloading openerp delete patient data sql file${NOCOLOR}" + if [ -z "$OPENERP_DB_USER" ]; + then echo -e "${RED}OPENERP_DB_USER is unset. Please set the ENVIRONMENT VARIABLE OPENERP_DB_USER${NOCOLOR}" + else + echo -e "${CYAN}deleting openerp patient data${NOCOLOR}" + psql -U$OPENERP_DB_USER openerp < $OPENERP_SQL_FILE + exitcode=$? + if [ $exitcode -ne 0 ]; then + echo -e "${RED}Failed to delete the openerp patient data${NOCOLOR}" + else + echo -e "${GREEN} Successfully deleted the openerp patient data${NOCOLOR}" + fi + fi +} + +start_all_bahmni_services() +{ + echo -e "${CYAN}Starting all bahmni related services${NOCOLOR}" + bahmni -i $INVENTORY_FILE start +} + +stop_all_bahmni_services +download_and_delete_openmrs_patient_data +download_and_delete_openelis_patient_data +download_and_delete_openerp_patient_data +start_all_bahmni_services diff --git a/deletePatientData/deletePatientDataForOpenERP.sql b/deletePatientData/deletePatientDataForOpenERP.sql new file mode 100755 index 0000000..2c93da6 --- /dev/null +++ b/deletePatientData/deletePatientDataForOpenERP.sql @@ -0,0 +1,64 @@ +truncate table + sale_order, + sale_order_line, + sale_make_invoice, + sale_order_invoice_rel, + sale_order_line_invoice_rel, + sale_order_line_make_invoice, + sale_order_line_property_rel, + sale_order_tax, + + sale_order_group, + account_invoice_line, + ledger_journal_rel, + reconcile_account_rel, + validate_account_move, + procurement_order, + purchase_order, + purchase_order_line, + purchase_invoice_rel, + stock_picking, + stock_partial_picking, + stock_partial_picking_line, + stock_partial_move, + stock_partial_move_line, + stock_move, + stock_move_split, + stock_move_split_lines, + stock_return_picking_memory, + stock_inventory_move_rel, + stock_move_history_ids, + + account_invoice_line_tax, + account_invoice, + account_invoice_refund, + account_invoice_tax, + account_invoice_cancel, + account_invoice_confirm, + + purchase_order_line_invoice_rel, + stock_warehouse_orderpoint, + purchase_order_taxe, + + account_voucher, + account_bank_statement_line, + account_voucher_line, + account_bank_statement_line_move_rel, + + account_move_line, + account_move_line_relation, + account_analytic_line, + hr_analytic_timesheet; + +truncate table + res_partner_attributes, + res_partner_address, + res_partner_bank_type_field, + res_partner_res_partner_category_rel, + res_partner_category; + +delete from res_partner where not exists (select ru.partner_id from res_users ru where ru.partner_id = res_partner.id) and id != 1; +delete from markers where feed_uri like '%atomfeed/encounter/recent%' OR feed_uri like '%atomfeed/patient/recent%'; +delete from event_records where category = 'product'; + +truncate table event_records_offset_marker; diff --git a/deletePatientData/deletePatientDataForOpenElis.sql b/deletePatientData/deletePatientDataForOpenElis.sql new file mode 100755 index 0000000..bcf1443 --- /dev/null +++ b/deletePatientData/deletePatientDataForOpenElis.sql @@ -0,0 +1,37 @@ +truncate table result_signature, + referral_result, + referral, + result_inventory, + result, + worksheet_analyte, + note, + report_external_export, + report_external_import, + analysis_qaevent, + analysis_storages, + analysis_users, + analysis, + sample_qaevent, + sample_requester, + sample_human, + sample_newborn, + sample_animal, + sample_environmental, + sample_item, + sample_organization, + sample_projects, + sample, + observation_history, + patient, + patient_identity, + patient_occupation, + person_address, + patient_patient_type, + patient_relations, + organization_contact; + +delete from person where not exists (select p.person_id from provider p where p.person_id = person.id); +delete from markers where feed_uri like '%atomfeed/encounter/recent%' OR feed_uri like '%atomfeed/patient/recent%'; +delete from event_records where category = 'patient'; + +truncate table event_records_offset_marker; diff --git a/deletePatientData/deletePatientDataForOpenMRS.sql b/deletePatientData/deletePatientDataForOpenMRS.sql new file mode 100755 index 0000000..2894059 --- /dev/null +++ b/deletePatientData/deletePatientDataForOpenMRS.sql @@ -0,0 +1,52 @@ +set foreign_key_checks=0; + +truncate table test_order; +truncate table drug_order; +truncate table note; +truncate table obs_relationship; +truncate table concept_proposal; +truncate table concept_proposal_tag_map; +truncate table obs; +truncate table orders; +truncate table drug_order; +truncate table test_order; +truncate table relationship; +truncate table visit_attribute; +truncate table bed_patient_assignment_map; +truncate table encounter_provider; +truncate table episode_encounter; +truncate table order_group; +truncate table encounter; +truncate table appointmentscheduling_appointment; +truncate table appointmentscheduling_appointment_status_history; +truncate table patient_appointment; +truncate table visit_attribute; +truncate table visit; +truncate table patient_identifier; +truncate table appointmentscheduling_appointment_request; +truncate table conditions; +truncate table cohort_member; +truncate table patient_program; +truncate table episode_patient_program; +truncate table patient_program_attribute; +truncate table patient_state; +truncate table patient; +truncate table episode; +truncate table audit_log; +delete from person_address where person_id <> 1; +delete from person_attribute where person_id <> 1; +delete from person_name where not exists + (select u.person_id from users u where person_name.person_id = u.person_id or person_name.person_id = 1) + and not exists (select p.person_id from provider p where person_name.person_id = p.person_id or person_name.person_id = 1); +delete from person where not exists + (select u.person_id from users u where person.person_id = u.person_id or person.person_id = 1) + and not exists (select p.person_id from provider p where person.person_id = p.person_id or person.person_id = 1); + +delete from event_records where category = 'patient' OR category = 'Encounter'; +delete from markers where feed_uri like '%feed/patient/recent%' ; + +truncate table event_records_offset_marker; + +update bed set status="AVAILABLE"; + +set foreign_key_checks=1; diff --git a/deletePatientData/sesp_delete_patient_data.sh b/deletePatientData/sesp_delete_patient_data.sh new file mode 100755 index 0000000..e045f42 --- /dev/null +++ b/deletePatientData/sesp_delete_patient_data.sh @@ -0,0 +1,11 @@ +# Set environment variables required for the scripts +export OPENMRS_DB_USER=openmrs-user +export OPENELIS_DB_USER=clinlims +export OPENERP_DB_USER=openerp +export INVENTORY_FILE=local + +# Add executable permission for the scripts +chmod a+x * + +# Start the script execution +sh deletePatientData.sh diff --git a/script/MOZ_clonRepos.sh b/script/MOZ_clonRepos.sh new file mode 100644 index 0000000..0575667 --- /dev/null +++ b/script/MOZ_clonRepos.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Create Directory +cd /opt +sudo mkdir sesp_poc_repositories + +# Clone Repos + +cd /opt/sesp_poc_repositories + +# Bahmni-config +sudo git clone https://github.com/esaude/esaude-poc-config.git --branch develop + +# Openmrs-module-bahmniapps +sudo git clone https://github.com/esaude/openmrs-module-bahmniapps.git --branch develop + +# Metadata +sudo git clone https://github.com/esaude/sesp-bahmni-metadata.git --branch develop + +# Openerp-module +sudo git clone https://github.com/esaude/openerp-modules.git --branch develop + +# Patient-status-scheduler +sudo git clone https://github.com/esaude/patient-status-scheduler.git --branch develop + +# Bahmni-emr-hospital-service +sudo git clone https://github.com/esaude/bahmni-emr-hospital-service.git --branch develop + +# Sesp-infrastructure +sudo git clone https://github.com/esaude/sesp-infrastructure.git --branch develop + + + + + diff --git a/script/MOZ_dev_server_setup.sh b/script/MOZ_dev_server_setup.sh new file mode 100644 index 0000000..a763495 --- /dev/null +++ b/script/MOZ_dev_server_setup.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# Link the app folder +sudo mv /opt/bahmni-web/etc/bahmniapps /opt/bahmni-web/etc/bahmniapps-original +sudo ln -s /opt/sesp_poc_repositories/openmrs-module-bahmniapps/ui/app /opt/bahmni-web/etc/bahmniapps +sudo chown -h bahmni:bahmni /opt/bahmni-web/etc/bahmniapps + +# Link the config folder +sudo mv -b /opt/bahmni-web/etc/bahmni_config /opt/bahmni-web/etc/bahmni_config-original +sudo ln -s /opt/sesp_poc_repositories/esaude-poc-config /opt/bahmni-web/etc/bahmni_config +sudo chown -h bahmni:bahmni /opt/bahmni-web/etc/bahmni_config + +# Link the metadata folder +sudo ln -s /opt/sesp_poc_repositories/sesp-bahmni-metadata/configuration /opt/openmrs/configuration +sudo chown -h bahmni:bahmni /opt/openmrs/configuration + +# Link the module folder +sudo mv /opt/openmrs/modules /opt/openmrs/modules-original +sudo ln -s /opt/sesp_poc_repositories/sesp-infrastructure/Openmrs_Modules /opt/openmrs/modules +sudo chown -h bahmni:bahmni /opt/openmrs/modules + +# Link the HTML folder +sudo mv -b /var/www/html /var/www/html-original +sudo ln -s /opt/sesp_poc_repositories/bahmni-emr-hospital-service/html /var/www/html +sudo chown -h bahmni:bahmni /var/www/html + +# Link the Openerp-Modules +sudo mv -b /opt/bahmni-erp/bahmni-addons /opt/bahmni-erp/bahmni-addons-original +sudo ln -s /opt/sesp_poc_repositories/modules /opt/bahmni-erp/bahmni-addons +sudo chown -h bahmni:bahmni /opt/bahmni-erp/bahmni-addons + + +# Run sql scripts +mysql -uroot -ppassword openmrs < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/mySQL/alter_visit_locatiion.sql +mysql -uroot -ppassword openmrs < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/mySQL/person_attribute_alter_value_column.sql + +# Run postgresql scripts +#OpenElis +psql -Uclinlims clinlims < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/elisPostgresql/1_openElisUesrRole.sql +psql -Uclinlims clinlims < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/elisPostgresql/2_removeHomeIcon.sql +psql -Uclinlims clinlims < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/elisPostgresql/3_UpdateTestName.sql +psql -Uclinlims clinlims < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/elisPostgresql/4_hideDepartment.sql +psql -Uclinlims clinlims < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/elisPostgresql/5_hideSampleType.sql +psql -Uclinlims clinlims < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/elisPostgresql/6_unitRanges.sql +psql -Uclinlims clinlims < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/elisPostgresql/7_visitType.sql +# OpenERP +psql -Uopenerp openerp < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/erpPostgresql/categoryNameUpdate.sql +psql -Uopenerp openerp < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/erpPostgresql/currencyUpdate.sql +psql -Uopenerp openerp < /opt/sesp_poc_repositories/sesp-bahmni-metadata/sql/erpPostgresql/syncable_units.sql + + +# Restart OpenMRS +sudo service openmrs restart 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" + +