From 33ef3ea8737607b4fd0fd30f7258a66c1664b03d Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 7 Apr 2023 00:15:58 +0200 Subject: [PATCH] Run the upstream finish_install script --- manifest.json | 18 ++++++++++++++++++ scripts/install | 11 +++++++++++ scripts/upgrade | 9 +++++++++ 3 files changed, 38 insertions(+) diff --git a/manifest.json b/manifest.json index 1187c98..6c99a23 100644 --- a/manifest.json +++ b/manifest.json @@ -37,6 +37,24 @@ "name": "path", "type": "path", "default": "/ci" + }, + { + "name": "", + "type": "select", + "choices": ["auto", "manual"] + "default": "manual" + "ask": { + "en": "Should the jobs be automatically run from the apps list?" + } + }, + { + "name": "cluster", + "type": "select", + "choices": ["cluster", "no"] + "default": "no" + "ask": { + "en": "Should an LXD cluster be created with this server as first node?" + } } ] } diff --git a/scripts/install b/scripts/install index 7a8381d..41212ac 100644 --- a/scripts/install +++ b/scripts/install @@ -25,6 +25,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH +mode=$YNH_APP_ARG_MODE +cluster=$YNH_APP_ARG_CLUSTER app=$YNH_APP_INSTANCE_NAME @@ -126,6 +128,15 @@ ynh_add_config --template="yunorunner.config.py" --destination="$final_path/conf chmod 400 "$final_path/config.py" chown $app:$app "$final_path/config.py" +#================================================= +# FINISH INSTALL +#================================================= +ynh_script_progression --message="Run Yunorunner's finish_install script..." + +pushd "$final_path" + ./finish_install.sh $mode $cluster +popd + #================================================= # SETUP SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 17a41ac..0f5eed8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -151,6 +151,15 @@ pushd $final_path venv/bin/pip install -r requirements-frozen.txt popd +#================================================= +# FINISH INSTALL +#================================================= +ynh_script_progression --message="Run Yunorunner's finish_install script..." + +pushd "$final_path" + ./finish_install.sh +popd + #================================================= # UPDATE A CONFIG FILE #=================================================