From 64141b61c2773cead4552ac2b0f939b35a004fb4 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sat, 2 Dec 2017 00:30:29 +0100 Subject: [PATCH] Remove GNU Health notes --- gnuhealth.sh | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) mode change 100644 => 100755 gnuhealth.sh diff --git a/gnuhealth.sh b/gnuhealth.sh old mode 100644 new mode 100755 index 3cfeace..e5e9fe1 --- a/gnuhealth.sh +++ b/gnuhealth.sh @@ -46,53 +46,3 @@ systemctl start gnuhealth # Add portal application definition ${SOURCE_DIR}/basic/portal-app-manager.py gnuhealth "https://{host}:8006/" admin "${GNUHEALTH_ADMIN_PWD}" ${SOURCE_DIR}/basic/portal-app-manager.py gnuhealth-clients - - - - - - - - - - - - - -# Add GNU Health + Tryton repository -echo "deb http://debian.tryton.org/debian/ stretch-3.8 main" > /etc/apt/sources.list.d/tryton.list -wget http://debian.tryton.org/debian/debian.tryton.org-archive.gpg -O - | apt-key add - -apt-get -y update - -# Install GNU Health -apt-get -y --no-install-recommends install tryton-modules-health-all -t stretch-3.8 - -# Pin the Tryton repository packages -cat </etc/apt/preferences.d/debian.tryton.org.pref -Package: * -Pin: release o=debian.tryton.org -Pin-Priority: 999 -EOF -# cp ${SOURCE_DIR}/gnuhealth/etc/apt/preferences.d/debian.tryton.org.pref /etc/apt/preferences.d/debian.tryton.org.pref - -# Create database -export GNUHEALTH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '/+=') -cat </tmp/gnuhealth-createdb.sql -CREATE ROLE gnuhealth NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT LOGIN ENCRYPTED PASSWORD '${GNUHEALTH_PWD}'; -CREATE DATABASE gnuhealth; -REVOKE ALL ON DATABASE gnuhealth FROM public; -ALTER DATABASE gnuhealth OWNER TO gnuhealth; -EOF -# envsubst <${SOURCE_DIR}/gnuhealth/tmp/gnuhealth-createdb.sql >/tmp/gnuhealth-createdb.sql -sudo -u postgres psql -f /tmp/gnuhealth-createdb.sql -rm -f /tmp/gnuhealth-createdb.sql - -# Configure GNU Health -envsubst <${SOURCE_DIR}/gnuhealth/etc/tryton/trytond.conf >/etc/tryton/trytond.conf - -# Populate database -sudo -u tryton trytond -c /etc/tryton/trytond.conf -d gnuhealth --all -v - - - -systemctl restart tryton-server.service