add: initial profile.d script

This commit is contained in:
Stepan Kasatkin 2025-05-16 15:11:56 +05:00
parent f091cec3cc
commit aa2728b99c

29
docker-installer-init.sh Normal file
View File

@ -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"