62 lines
2.5 KiB
Bash
62 lines
2.5 KiB
Bash
#!/bin/bash
|
|
|
|
# autoreply config update dialog with default answer no
|
|
if [[ ! -f /etc/apt/apt.conf.d/local ]]
|
|
then
|
|
echo "Dpkg::Options {" >> /etc/apt/apt.conf.d/local
|
|
echo " "--force-confdef";" >> /etc/apt/apt.conf.d/local
|
|
echo " "--force-confold";" >> /etc/apt/apt.conf.d/local
|
|
echo "}" >> /etc/apt/apt.conf.d/local
|
|
fi
|
|
|
|
# remove chromium
|
|
DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge chromium*
|
|
DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
|
|
|
|
# update docker key
|
|
sudo apt-get install ca-certificates curl
|
|
sudo install -m 0755 -d /etc/apt/keyrings
|
|
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
|
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
|
echo \
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
|
|
# update and install apps
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y firefox-esr gnome-themes-extra xfce4-whiskermenu-plugin git nano wget curl ncdu pwgen
|
|
|
|
# set git config
|
|
git config --global user.name "akanealw"
|
|
git config --global user.email "akanealw@gmail.com"
|
|
git config --global init.defaultBranch main
|
|
git config --global credential.helper store
|
|
|
|
# add aliases
|
|
echo "alias lsa='ls -alhvF'" >> /etc/bash.bashrc
|
|
echo "alias aptupy='sudo apt update && sudo apt upgrade -y'" >> /etc/bash.bashrc
|
|
echo "alias aptiy='sudo apt install -y'" >> /etc/bash.bashrc
|
|
echo "alias aptry='sudo apt remove -y'" >> /etc/bash.bashrc
|
|
echo "alias aptrpy='sudo apt remove --purge -y'" >> /etc/bash.bashrc
|
|
echo "alias aptary='sudo apt autoremove -y'" >> /etc/bash.bashrc
|
|
echo "alias apts='sudo apt search'" >> /etc/bash.bashrc
|
|
|
|
# set input preferences
|
|
if [[ ! -f /etc/inputrc.default ]]
|
|
then wget -qO /etc/inputrc.default http://192.168.1.50/files/debian/inputrc.default
|
|
fi
|
|
rm /etc/inputrc > /dev/null 2>&1
|
|
cp /etc/inputrc.default /etc/inputrc
|
|
echo "" >> /etc/inputrc
|
|
echo "set completion-ignore-case On" >> /etc/inputrc
|
|
|
|
# add proxy settings
|
|
echo "no_proxy=127.0.0.1,localhost" >> /etc/profile.d/proxy.sh
|
|
echo "http_proxy=http://192.168.1.30:8888/" >> /etc/profile.d/proxy.sh
|
|
echo "https_proxy=http://192.168.1.30:8888/" >> /etc/profile.d/proxy.sh
|
|
echo "NO_PROXY=127.0.0.1,localhost" >> /etc/profile.d/proxy.sh
|
|
echo "HTTP_PROXY=http://192.168.1.30:8888/" >> /etc/profile.d/proxy.sh
|
|
echo "HTTPS_PROXY=http://192.168.1.30:8888/" >> /etc/profile.d/proxy.sh
|