From a78825fa1af9cf27c07f0ff52916bdc5d67e96f1 Mon Sep 17 00:00:00 2001 From: Xiufeng Guo Date: Sat, 17 Dec 2022 15:41:28 +1100 Subject: [PATCH] Update debian.sh --- debian.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/debian.sh b/debian.sh index 8b16349..4bf409f 100644 --- a/debian.sh +++ b/debian.sh @@ -2,8 +2,8 @@ ######################################################### # Function :Initial Server Setup for Debian Server # # Platform :Debian 11.x Bullseye # -# Version :1.2 # -# Date :06-29-2022 # +# Version :1.3 # +# Date :12-17-2022 # # Author :Xiufeng Guo # # Contact :i@m.ac # # Company :xTom # @@ -111,7 +111,8 @@ function install_packages() { unzip rsync \ bash-completion git whois \ fail2ban iptables haveged gnupg vnstat lrzsz jq \ - unattended-upgrades apt-listchanges + unattended-upgrades apt-listchanges \ + htop iftop p7zip-full printf "\E[0;35;40m" echo '### Updating system... ###' printf "\E[0m" @@ -212,6 +213,15 @@ alias ll='ls --color=auto -alF' alias l='ls -A' alias mtr='mtr --aslookup --show-ips' PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\\$ \[\033[00m\]' + +# If this is an xterm set the title to user@host:dir +case "\$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;\${debian_chroot:+(\$debian_chroot)}\u@\h: \w\a\]\$PS1" + ;; +*) + ;; +esac EOF printf "\E[0;33;40m" echo "### Custom .bashrc added ###" @@ -304,7 +314,7 @@ function add_nginx_repo() { printf "\E[0;35;40m" echo '### Add n.wtf Nginx repo ###' printf "\E[0m" - curl -sS https://raw.githubusercontent.com/u-sb/nginx-docs/main/public/public.key | gpg --dearmor > /usr/share/keyrings/n.wtf.gpg + curl -sS https://n.wtf/public.key | gpg --dearmor > /usr/share/keyrings/n.wtf.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/n.wtf.gpg] https://mirror-cdn.xtom.com/sb/nginx/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/n.wtf.list printf "\E[0;33;40m" echo "### n.wtf Nginx repo added ###" @@ -387,7 +397,7 @@ function add_acme_sh() { printf "\E[0;35;40m" echo '### Install acme.sh ###' printf "\E[0m" - curl -sS https://get.acme.sh | bash -s email=david@xtom.com + curl -sS https://get.acme.sh | bash -s email=i@m.ac /root/.acme.sh/acme.sh --upgrade --auto-upgrade /root/.acme.sh/acme.sh --set-default-ca --server letsencrypt printf "\E[0;33;40m"