mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 10:41:32 +00:00
Implement basic packaging/install/entry scripts
The packaging script will create a new tar.bz2 archive containing an install script, a set of docker images, and a root folder with files to be installed. The root folder includes a systemd service, a docker compose file, an entry script, and a template config file. On installation docker images are loaded onto the target system, install files are copied, then systemd services are installed.
This commit is contained in:
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/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
|
||||
|
||||
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
|
||||
|
||||
if [ -f /.dockerenv ]; then
|
||||
echo "Docker environment detected - skipping systemd installation"
|
||||
else
|
||||
echo "installing system service"
|
||||
systemctl daemon-reload
|
||||
systemctl enable streamline-emr
|
||||
systemctl start streamline-emr
|
||||
fi
|
||||
Reference in New Issue
Block a user