Add lantern stage/task_begin/end directives to make output pretty
Some checks are pending
continuous-integration/laminar-eldarion Build failed with exit code 123 after 5 seconds
Some checks are pending
continuous-integration/laminar-eldarion Build failed with exit code 123 after 5 seconds
This commit is contained in:
parent
bcb8a1c6c3
commit
3cfc950335
2 changed files with 34 additions and 1 deletions
35
src/run.sh
35
src/run.sh
|
@ -93,6 +93,7 @@ task_begin "Setting initial state";
|
||||||
cat apt-packages.txt >"${temp_dir}/apt-packages.txt";
|
cat apt-packages.txt >"${temp_dir}/apt-packages.txt";
|
||||||
|
|
||||||
queue_preinstall_step "10-apt-update.sh";
|
queue_preinstall_step "10-apt-update.sh";
|
||||||
|
queue_preinstall_step "15-ufw.sh";
|
||||||
queue_postinstall_step "100-ssh-cluster-config.sh";
|
queue_postinstall_step "100-ssh-cluster-config.sh";
|
||||||
task_end "$?";
|
task_end "$?";
|
||||||
|
|
||||||
|
@ -109,6 +110,8 @@ step_current="1";
|
||||||
|
|
||||||
stage_begin "Configuring software choices";
|
stage_begin "Configuring software choices";
|
||||||
|
|
||||||
|
# TODO: hostname
|
||||||
|
|
||||||
if ask_yesno "Use apt cache?"; then
|
if ask_yesno "Use apt cache?"; then
|
||||||
source ./steps-config/10-apt-cache.sh;
|
source ./steps-config/10-apt-cache.sh;
|
||||||
fi
|
fi
|
||||||
|
@ -117,6 +120,13 @@ if ask_yesno "Install Docker?"; then
|
||||||
source ./steps-config/10-docker.sh;
|
source ./steps-config/10-docker.sh;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
# Autonomous config tasks
|
||||||
|
###
|
||||||
|
|
||||||
|
source ./steps-config/50-avahi-daemon.sh
|
||||||
|
|
||||||
stage_end "$?";
|
stage_end "$?";
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -125,10 +135,12 @@ stage_end "$?";
|
||||||
# Pre-install tasks
|
# Pre-install tasks
|
||||||
###
|
###
|
||||||
|
|
||||||
|
stage_begin "Executing pre-install tasks";
|
||||||
while read -r preinstall_step; do
|
while read -r preinstall_step; do
|
||||||
#shellcheck disable=SC1090
|
#shellcheck disable=SC1090
|
||||||
source "steps-preinstall/${preinstall_step}";
|
source "steps-preinstall/${preinstall_step}";
|
||||||
done < <(cat "${temp_dir}/steps-preinstall.txt");
|
done < <(cat "${temp_dir}/steps-preinstall.txt");
|
||||||
|
stage_end "$?" "1 or more pre-install tasks failed";
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
@ -136,7 +148,9 @@ done < <(cat "${temp_dir}/steps-preinstall.txt");
|
||||||
# Install packages
|
# Install packages
|
||||||
###
|
###
|
||||||
|
|
||||||
apt-get install "$(cat "${temp_dir}/apt-packages.txt")";
|
stage_begin "Installing apt packages";
|
||||||
|
apt-get install --no-install-recommends --yes "$(cat "${temp_dir}/apt-packages.txt")";
|
||||||
|
stage_end "$?" "Failed to install apt packages";
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
@ -144,10 +158,12 @@ apt-get install "$(cat "${temp_dir}/apt-packages.txt")";
|
||||||
# Post-install tasks
|
# Post-install tasks
|
||||||
###
|
###
|
||||||
|
|
||||||
|
stage_begin "Running post-install tasks";
|
||||||
while read -r postinstall_step; do
|
while read -r postinstall_step; do
|
||||||
#shellcheck disable=SC1090
|
#shellcheck disable=SC1090
|
||||||
source "steps-postinstall/${postinstall_step}";
|
source "steps-postinstall/${postinstall_step}";
|
||||||
done < <(cat "${temp_dir}/steps-postinstall.txt");
|
done < <(cat "${temp_dir}/steps-postinstall.txt");
|
||||||
|
stage_begin "$?" "Failed to run 1 or more post-install tasks";
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
@ -156,3 +172,20 @@ done < <(cat "${temp_dir}/steps-postinstall.txt");
|
||||||
###
|
###
|
||||||
|
|
||||||
source "steps-last/15-ufw.sh";
|
source "steps-last/15-ufw.sh";
|
||||||
|
|
||||||
|
|
||||||
|
echo "
|
||||||
|
██████ ██████ ██████ ██ ██ ██ ███████ ██ ██████ ███ ██ ██ ███ ██ ██████
|
||||||
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██
|
||||||
|
██████ ██████ ██ ██ ██ ██ ██ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███
|
||||||
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██████ ████ ██ ███████ ██ ██████ ██ ████ ██ ██ ████ ██████
|
||||||
|
|
||||||
|
██████ ██████ ███ ███ ██████ ██ ███████ ████████ ███████ ██
|
||||||
|
██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ████ ██ ██████ ██ █████ ██ █████ ██
|
||||||
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||||
|
██████ ██████ ██ ██ ██ ███████ ███████ ██ ███████ ██
|
||||||
|
|
||||||
|
This host is now ready for use.
|
||||||
|
";
|
||||||
|
|
Loading…
Reference in a new issue