mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 10:41:32 +00:00
- A bug in `entry` caused the script to not change into the directory correctly. This was corrected by marking the script as bash rather than sh. - `install.sh` now stops a running service before updating - `docker-compose.yml` now assigns a consistent container name for the app - `docker-compose.yml` now uses environment variables or a `.env` file to assign container name and port mappings if available - updated readme file with better instructions
52 lines
1.3 KiB
Bash
Executable File
52 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright (C) Wendepunkt Medical Innovations, Inc - All Rights Reserved.
|
|
# Unauthorized copying of this file, via any medium is strictly prohibited.
|
|
# Proprietary and confidential
|
|
#
|
|
# For information: dev@signalytic.ca
|
|
#
|
|
|
|
#
|
|
# Install the Streamline "Streamline EMR" application and services
|
|
#
|
|
# The caller of this script must check the exit value and possibly do a
|
|
# roll-back if it is non-zero. If the exit value is non-zero services have not
|
|
# been restarted.
|
|
|
|
LOCATION="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
then echo "Please run as root"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
# stop any running systemd service if not running in a docker environment
|
|
if [ -f /.dockerenv ]; then
|
|
echo "Docker environment detected - skipping systemd installation"
|
|
else
|
|
echo "stopping system service"
|
|
systemctl stop streamline-emr
|
|
fi
|
|
|
|
set -e
|
|
|
|
# copy root files
|
|
echo "importing root files"
|
|
cp -rfv $LOCATION/root/* /
|
|
|
|
# import docker images
|
|
for f in $(find $LOCATION/images -name "*.img");do
|
|
echo "importing docker image: $f"
|
|
docker load -i $f
|
|
done
|
|
|
|
# install systemd service unless running in a docker environment
|
|
if [ ! -f /.dockerenv ]; then
|
|
echo "installing system service"
|
|
systemctl daemon-reload
|
|
systemctl enable streamline-emr
|
|
systemctl start streamline-emr
|
|
fi
|