mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 10:41:32 +00:00
- review cleanups
This commit is contained in:
@@ -5,6 +5,5 @@ LOCATION="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|||||||
CONFIG=${CONFIG:-${LOCATION}/config.json}
|
CONFIG=${CONFIG:-${LOCATION}/config.json}
|
||||||
SRC=${SRC:-${LOCATION}/src}
|
SRC=${SRC:-${LOCATION}/src}
|
||||||
BUILD_DIR=${BUILD_DIR:-${LOCATION}/build-packages}
|
BUILD_DIR=${BUILD_DIR:-${LOCATION}/build-packages}
|
||||||
#INSTALL_SCRIPT=${LOCATION}/install.sh
|
|
||||||
|
|
||||||
${LOCATION}/hosted-app-utils/package ${CONFIG} ${SRC} output=${BUILD_DIR} $@
|
${LOCATION}/hosted-app-utils/package ${CONFIG} ${SRC} output=${BUILD_DIR} $@
|
||||||
|
|||||||
@@ -97,39 +97,6 @@ def handle_restart(src_path: str, install_path: str):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def uninstall_app(args: argparse.Namespace, install_path) -> int:
|
|
||||||
"""
|
|
||||||
Uninstall application at specified installation directory.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
install_path (str): Path to target installation directory.
|
|
||||||
Returns:
|
|
||||||
Int
|
|
||||||
"""
|
|
||||||
|
|
||||||
rval = 0
|
|
||||||
try:
|
|
||||||
|
|
||||||
# disable application then uninstall
|
|
||||||
disable_path = os.path.join(install_path, 'disable')
|
|
||||||
stop_path = os.path.join(install_path, 'stop')
|
|
||||||
if os.path.exists(disable_path):
|
|
||||||
subprocess.check_output(disable_path)
|
|
||||||
|
|
||||||
if os.path.exists(stop_path):
|
|
||||||
subprocess.check_output(stop_path)
|
|
||||||
|
|
||||||
# reset vols, networks
|
|
||||||
subprocess.check_output(['docker', 'compose', '-f', f'{install_path}/docker-compose.yml', 'down', '-v'])
|
|
||||||
|
|
||||||
if os.path.exists(install_path):
|
|
||||||
shutil.rmtree(install_path)
|
|
||||||
except Exception as e:
|
|
||||||
print(f'Exception encountered: {e}')
|
|
||||||
traceback.print_exc()
|
|
||||||
rval = 1
|
|
||||||
return rval
|
|
||||||
|
|
||||||
# script constants
|
# script constants
|
||||||
utils_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
|
utils_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
|
||||||
temp_dir = tempfile.mkdtemp()
|
temp_dir = tempfile.mkdtemp()
|
||||||
|
|||||||
Reference in New Issue
Block a user