Update init_without_docker.sh

This commit is contained in:
qiaofeng1227 2022-11-08 09:11:32 +08:00 committed by GitHub
parent 9d2092746a
commit cdb79f6fd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,12 +3,7 @@
#!/bin/bash #!/bin/bash
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
newpassword=$1 new_password=$1
# echo $newpassword |passwd --stdin fastuser sudo su
echo "fastuser:$newpassword" | chpasswd cd /www/server/panel
python tools.py panel $new_password
sed -i '/172.17.0.1/d' /etc/nginx/conf.d/parking.conf
internal_ip=$(ip addr show dev eth0|grep inet |grep eth0|cut -d/ -f1|cut -d" " -f6)
old_ip=$(cat /etc/nginx/conf.d/parking.conf |grep default_server|grep ssl |cut -d: -f1|cut -d" " -f6)
sed -i "s/$old_ip/$internal_ip/g" /etc/nginx/conf.d/parking.conf
systemctl restart nginx