From 119908dfec57af42c8513ce0a229674e8a1d7824 Mon Sep 17 00:00:00 2001 From: conrad96 Date: Fri, 28 Aug 2026 13:04:44 +0300 Subject: [PATCH] - review cleanups --- package | 1 - scripts/clientappctl | 37 ++----------------------------------- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/package b/package index 89344df6..97c24c5d 100755 --- a/package +++ b/package @@ -5,6 +5,5 @@ LOCATION="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" CONFIG=${CONFIG:-${LOCATION}/config.json} SRC=${SRC:-${LOCATION}/src} BUILD_DIR=${BUILD_DIR:-${LOCATION}/build-packages} -#INSTALL_SCRIPT=${LOCATION}/install.sh ${LOCATION}/hosted-app-utils/package ${CONFIG} ${SRC} output=${BUILD_DIR} $@ diff --git a/scripts/clientappctl b/scripts/clientappctl index 4800c223..52dc31ce 100755 --- a/scripts/clientappctl +++ b/scripts/clientappctl @@ -13,7 +13,7 @@ def run_script(script_path: str) -> int: if not os.path.exists(script_path): print(f"Error: Script not found at {script_path}", file=sys.stderr) return 1 - + try: subprocess.run(f'{script_path}', check=True, capture_output=True, text=True) return 0 @@ -97,39 +97,6 @@ def handle_restart(src_path: str, install_path: str): 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 utils_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) temp_dir = tempfile.mkdtemp() @@ -204,4 +171,4 @@ def main() -> int: return 1 if __name__ == '__main__': - sys.exit(main()) \ No newline at end of file + sys.exit(main())