added updates
This commit is contained in:
@@ -2,5 +2,4 @@
|
||||
|
||||
apk update
|
||||
apk add sudo
|
||||
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
|
||||
adduser akanealw wheel
|
||||
echo '%akanealw ALL=(ALL) ALL' > /etc/sudoers.d/akanealw
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "# custom settings and aliases" > ~/.profile
|
||||
echo "" >> ~/.profile
|
||||
echo "alias lsa='ls -alhvF'" >> ~/.profile
|
||||
echo "alias cd..='cd ..'" >> ~/.profile
|
||||
echo "alias ..='cd ..'" >> ~/.profile
|
||||
echo "alias ...='cd ../..'" >> ~/.profile
|
||||
echo "alias grep='grep --color'" >> ~/.profile
|
||||
echo "alias mkdir='mkdir -pv'" >> ~/.profile
|
||||
echo "alias du='du -h'" >> ~/.profile
|
||||
echo "alias df='df -h'" >> ~/.profile
|
||||
echo "alias ports='netstat -tulpna'" >> ~/.profile
|
||||
echo "alias tf='tail -f'" >> ~/.profile
|
||||
echo "alias dc='docker compose'" >> ~/.profile
|
||||
echo "alias dcup='docker compose up -d'" >> ~/.profile
|
||||
echo "alias dcdown='docker compose down'" >> ~/.profile
|
||||
echo "alias dcpull='docker compose pull'" >> ~/.profile
|
||||
echo "alias dps='docker ps'" >> ~/.profile
|
||||
echo "alias dstart='docker start'" >> ~/.profile
|
||||
echo "alias dstop='docker stop'" >> ~/.profile
|
||||
echo "alias drestart='docker restart'" >> ~/.profile
|
||||
echo "alias dlf='docker logs -f'" >> ~/.profile
|
||||
echo "alias dipaf='docker image prune -a -f'" >> ~/.profile
|
||||
@@ -1,8 +1,24 @@
|
||||
#!/bin/ash
|
||||
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
# apk update and install essentials
|
||||
apk update && apk upgrade
|
||||
apk add nano
|
||||
nano /etc/apk/repositories
|
||||
apk add nano sudo pwgen curl wget qemu-guest-agent git bash-doc bash-completion --no-cache
|
||||
|
||||
apk add curl wget qemu-guest-agent git bash-doc bash-completion --no-cache
|
||||
# change default shell to bash
|
||||
isInFile=$(cat /etc/passwd | grep -c "/bin/bash")
|
||||
if [ $isInFile -eq 0 ]
|
||||
then
|
||||
sed -i 's/ash/bash/g' /etc/passwd
|
||||
fi
|
||||
|
||||
# add akanealw to sudo users
|
||||
if [[ ! -f /etc/sudoers.d/akanealw ]]
|
||||
then
|
||||
echo "akanealw ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/akanealw
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/ash
|
||||
|
||||
apk update && apk upgrade
|
||||
apk add docker docker-cli-compose
|
||||
|
||||
addgroup akanealw docker
|
||||
|
||||
32
alpine/alpine-user-customizations.sh
Normal file
32
alpine/alpine-user-customizations.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# add aliases
|
||||
echo "# custom settings and aliases" > ~/.bash_profile
|
||||
echo "" >> ~/.bash_profile
|
||||
echo "alias lsa='ls -alhvF'" >> ~/.bash_profile
|
||||
echo "alias cd..='cd ..'" >> ~/.bash_profile
|
||||
echo "alias ..='cd ..'" >> ~/.bash_profile
|
||||
echo "alias ...='cd ../..'" >> ~/.bash_profile
|
||||
echo "alias grep='grep --color'" >> ~/.bash_profile
|
||||
echo "alias mkdir='mkdir -pv'" >> ~/.bash_profile
|
||||
echo "alias du='du -h'" >> ~/.bash_profile
|
||||
echo "alias df='df -h'" >> ~/.bash_profile
|
||||
echo "alias ports='netstat -tulpna'" >> ~/.bash_profile
|
||||
echo "alias tf='tail -f'" >> ~/.bash_profile
|
||||
echo "alias dc='docker compose'" >> ~/.bash_profile
|
||||
echo "alias dcup='docker compose up -d'" >> ~/.bash_profile
|
||||
echo "alias dcdown='docker compose down'" >> ~/.bash_profile
|
||||
echo "alias dcpull='docker compose pull'" >> ~/.bash_profile
|
||||
echo "alias dps='docker ps'" >> ~/.bash_profile
|
||||
echo "alias dstart='docker start'" >> ~/.bash_profile
|
||||
echo "alias dstop='docker stop'" >> ~/.bash_profile
|
||||
echo "alias drestart='docker restart'" >> ~/.bash_profile
|
||||
echo "alias dlf='docker logs -f'" >> ~/.bash_profile
|
||||
echo "alias dipaf='docker image prune -a -f'" >> ~/.bash_profile
|
||||
|
||||
# git config
|
||||
git config --global credential.helper store
|
||||
git config --global user.name "akanealw"
|
||||
git config --global user.email "akanealw@gmail.com"
|
||||
git config --global init.defaultBranch main
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/bin/ash
|
||||
|
||||
wget http://192.168.1.50/scripts/alpine/alpine-adduser-sudo.sh
|
||||
wget http://192.168.1.50/scripts/alpine/alpine-aliases.sh
|
||||
wget http://192.168.1.50/scripts/alpine/alpine-configure-git.sh
|
||||
wget http://192.168.1.50/scripts/alpine/alpine-essentials.sh
|
||||
wget http://192.168.1.50/scripts/alpine/alpine-install-docker.sh
|
||||
wget http://192.168.1.50/scripts/alpine/alpine-user-customizations.sh
|
||||
|
||||
mkdir ~/scripts
|
||||
mkdir ~/scripts > /dev/null 2>&1
|
||||
rm ~/scripts/alpine-* > /dev/null 2>&1
|
||||
mv alpine-* scripts/
|
||||
chmod +x ~/scripts/*
|
||||
|
||||
Reference in New Issue
Block a user