From aa2728b99c83366d8024ec828b5b85c6a4e9e9c7 Mon Sep 17 00:00:00 2001 From: Stepan Kasatkin Date: Fri, 16 May 2025 15:11:56 +0500 Subject: [PATCH] add: initial profile.d script --- docker-installer-init.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docker-installer-init.sh diff --git a/docker-installer-init.sh b/docker-installer-init.sh new file mode 100644 index 0000000..3819ae5 --- /dev/null +++ b/docker-installer-init.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# ################################################### # +# this is init script for docker-rootless-install # +# it will be placed in /etc/profile.d/ # +# and will be executed on first login # +# ################################################### # + +mkdir -p "$HOME/scripts" + +GIT_URL="https://gitea.wssk.ru/sk/docker-rootless-install" +INSTALLER_SCRIPT="$HOME/scripts/docker-install.sh" +FIRST_RUN_FLAG="$HOME/scripts/.docker_installer_first_run_done" + +if [ -f "$FIRST_RUN_FLAG" ]; then + return 0 +fi + +curl -s -o "$INSTALLER_SCRIPT" "$GIT_URL/raw/branch/master/docker-install.sh" +sleep 3 +chmod +x "$INSTALLER_SCRIPT" + +whiptail --title "WSSK" --msgbox "\n\ +📂 О, привет! Добавил тебе скрипт по установке rootless-докера.\n\n\ +Для запуска выполни:\n\ +./scripts/docker-install.sh\n\n\ +Успехов в разработке!" 15 70 + +touch "$FIRST_RUN_FLAG" \ No newline at end of file