Compare commits
No commits in common. "16c021179c4690dca890db9e27dc4d4325576e23" and "45a2cc046230efe0fed8a490e7eab67a2a3e73c2" have entirely different histories.
16c021179c
...
45a2cc0462
@ -15,7 +15,6 @@ fi
|
||||
# ============================================================
|
||||
|
||||
configure_tuna() {
|
||||
[ "$(uname)" = "Darwin" ] && return
|
||||
[ $offline -eq 1 ] && return
|
||||
[ $abroad -eq 1 ] && return
|
||||
|
||||
@ -111,7 +110,7 @@ configure_install_eza() {
|
||||
else
|
||||
unzip $scriptdir/files/eza_$(uname -m)-unknown-linux-musl.zip -d $tempdir/eza
|
||||
sudo cp $tempdir/eza/eza /usr/local/bin/
|
||||
rm -r $tempdir/eza
|
||||
rm $tempdir/eza -r
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@ -162,9 +161,7 @@ configure_zsh() {
|
||||
if confirm_action "要配置 zsh 吗?" "Y"; then
|
||||
pkg_install zsh
|
||||
|
||||
if [ -d ~/.oh-my-zsh ]; then
|
||||
rm -r ~/.oh-my-zsh
|
||||
fi
|
||||
rm ~/.oh-my-zsh -r
|
||||
git_clone ohmyzsh/ohmyzsh ~/.oh-my-zsh
|
||||
RUNZSH=no ZSH=~/.oh-my-zsh $scriptdir/files/install-ohmyzsh.sh
|
||||
|
||||
@ -218,11 +215,9 @@ configure_tmux() {
|
||||
[ $offline -eq 1 ] && return
|
||||
|
||||
if confirm_action "要配置 tmux 吗?" "Y"; then
|
||||
pkg_install tmux || return $?
|
||||
sudo apt-get install tmux -y
|
||||
|
||||
if [ -d ~/.tmux ]; then
|
||||
rm -r ~/.tmux
|
||||
fi
|
||||
rm ~/.tmux -r
|
||||
git_clone tmux-plugins/tpm ~/.tmux/plugins/tpm --norecursive
|
||||
git_clone tmux-plugins/tmux-sensible ~/.tmux/plugins/tmux-sensible
|
||||
git_clone tmux-plugins/tmux-yank ~/.tmux/plugins/tmux-yank
|
||||
@ -314,7 +309,6 @@ configure_mongodb() {
|
||||
}
|
||||
|
||||
configure_nginx() {
|
||||
[ "$(uname)" = "Darwin" ] && return
|
||||
[ $offline -eq 1 ] && return
|
||||
if [ ! -f /etc/apt/sources.list.d/nginx.sources ]; then
|
||||
curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx.gpg >/dev/null
|
||||
@ -434,7 +428,6 @@ configure_zsh_prefix() {
|
||||
}
|
||||
|
||||
configure_hostname() {
|
||||
[ "$(uname)" = "Darwin" ] && return
|
||||
if confirm_action "要修改 hostname 吗?" "N"; then
|
||||
read -p "hostname: " new_hostname
|
||||
echo $new_hostname | sudo tee /etc/hostname >/dev/null
|
||||
@ -490,7 +483,6 @@ configure_proxychains() {
|
||||
}
|
||||
|
||||
configure_node_exporter() {
|
||||
[ "$(uname)" = "Darwin" ] && return
|
||||
[ -f /usr/local/bin/node_exporter ] && return
|
||||
[ $offline -eq 1 ] && return
|
||||
|
||||
@ -510,7 +502,7 @@ configure_node_exporter() {
|
||||
sudo cp $node_exporter_dir/node_exporter /usr/local/bin/node_exporter
|
||||
sudo chmod +x /usr/local/bin/node_exporter
|
||||
rm $tempdir/node_exporter.tar.gz
|
||||
rm -r $node_exporter_dir
|
||||
rm $node_exporter_dir -r
|
||||
|
||||
# Generate a self-signed certificate
|
||||
# openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -keyout node_exporter.key -out node_exporter.crt
|
||||
@ -600,7 +592,6 @@ configure_git_gpg() {
|
||||
# ============================================================
|
||||
|
||||
configure_swap() {
|
||||
[ "$(uname)" = "Darwin" ] && return
|
||||
# Input the swap size
|
||||
read -p "Swap size (MB): " swap_size
|
||||
# Create a virtual memory file
|
||||
@ -645,6 +636,7 @@ configure_tmux
|
||||
# configure_nodejs
|
||||
configure_docker
|
||||
configure_fail2ban
|
||||
configure_iptables
|
||||
configure_ufw
|
||||
# configure_hostname
|
||||
configure_timedate
|
||||
|
||||
@ -24,8 +24,8 @@ configure_ssh_keygen() {
|
||||
|
||||
if confirm_action "要生成 sshkey 吗?" "N"; then
|
||||
mkdir -p ~/.ssh
|
||||
read -r -p "sshkey 的名字: " sshkeyname
|
||||
ssh-keygen -t ed25519 -C "$sshkeyname"
|
||||
read -p "sshkey 的名字: " sshkeyname
|
||||
ssh-keygen -t ed25519 -C $sshkeyname
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user