27 lines
535 B
Bash
27 lines
535 B
Bash
#!/bin/bash
|
|
|
|
#Change the environment file
|
|
echo 'alias cc="clear"
|
|
alias t="clear;exit"
|
|
cd /file
|
|
source /root/.local/bin/.bashrc
|
|
clear' >> ~/.bashrc
|
|
|
|
#Create .local/bin
|
|
mkdir -p /root/.local/bin
|
|
curl https://sh.lihanzhang.cn/arch/profile -o /root/.local/bin/.bashrc
|
|
chmod +x /root/.local/bin/.bashrc
|
|
|
|
#Create directories
|
|
if [ ! -d "/root/.ssh" ]; then
|
|
mkdir /root/.ssh
|
|
fi
|
|
mkdir /www/log -p
|
|
mkdir /file
|
|
|
|
chmod 000 /etc/update-motd.d/* -R
|
|
|
|
#Add public sshkey
|
|
bash <(curl -sL sh.lihanzhang.cn/pub)
|
|
echo -e "\e[32msource ~/.bashrc\e[0m"
|