docker-rootless-install/scripts/docker-installer-init.sh

29 lines
958 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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"