synchronization
This commit is contained in:
28
Ubuntu/start.sh
Normal file
28
Ubuntu/start.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
#############################################################################################
|
||||
# 用途: Ubuntu启动脚本
|
||||
# 作者: 丁辉
|
||||
# 编写时间: 2024-03-10
|
||||
#############################################################################################
|
||||
|
||||
# 启动SSH服务
|
||||
echo $(cat /etc/.pass/.root_password) | su - root -s /bin/bash -c "service ssh start"
|
||||
echo "SSH服务已启动"
|
||||
|
||||
# 检查文件是否存在, 不存在则创建文件
|
||||
if [ ! -f /home/$USER/.bash_logout ]; then
|
||||
cp /.file/.bash_logout /home/$USER/.bash_logout
|
||||
fi
|
||||
source /home/$USER/.bash_logout
|
||||
if [ ! -f /home/$USER/.bashrc ]; then
|
||||
cp /.file/.bashrc /home/$USER/.bashrc
|
||||
fi
|
||||
source /home/$USER/.bashrc
|
||||
if [ ! -f /home/$USER/.profile ]; then
|
||||
cp /.file/.profile /home/$USER/.profile
|
||||
fi
|
||||
source /home/$USER/.profile
|
||||
|
||||
# 保持容器运行
|
||||
tail -f /var/log/start.log
|
Reference in New Issue
Block a user