From adbaa2dd42ab9d0da09dc323ce5028bebe39dab8 Mon Sep 17 00:00:00 2001 From: AhFei Date: Fri, 13 Jan 2023 00:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- initial.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/initial.sh b/initial.sh index f3e7165..7d89a28 100644 --- a/initial.sh +++ b/initial.sh @@ -24,12 +24,12 @@ echo "step 1: install has finished" # step 2: localize -useradd -d /home/skf -m SkF%16_6 -usermod -s /bin/bash SkF%16_6 -usermod -aG sudo SkF%16_6 # 有些发行版 RN 的就没有sudo adm -usermod -aG adm SkF%16_6 -usermod -aG docker SkF%16_6 && newgrp docker -echo `groups SkF%16_6` +useradd -d /home/skf -m ${1} +usermod -s /bin/bash ${1} +usermod -aG sudo ${1} # 有些发行版 RN 的就没有sudo adm +usermod -aG adm ${1} +usermod -aG docker ${1} && newgrp docker +echo `groups ${1}` timedatectl set-timezone Asia/Shanghai echo `date` @@ -38,12 +38,12 @@ echo "step 2: localize has finished" # step 3: monitor -mkdir -p ~SkF%16_6/myserve/serverstatus && wget --no-check-certificate -qO ~SkF%16_6/myserve/serverstatus/client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' -chown -R SkF%16_6:SkF%16_6 ~SkF%16_6/myserve +mkdir -p ~${1}/myserve/serverstatus && wget --no-check-certificate -qO ~${1}/myserve/serverstatus/client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' +chown -R ${1}:${1} ~${1}/myserve -nohup python3 ~SkF%16_6/myserve/serverstatus/client-linux.py SERVER=serverstatus.ahfei.blog USER=ahfei-${1} PASSWORD=A23456.. >/dev/null 2>&1 & +nohup python3 ~${1}/myserve/serverstatus/client-linux.py SERVER=serverstatus.ahfei.blog USER=ahfei-${2} PASSWORD=A23456.. >/dev/null 2>&1 & -echo "@reboot python3 /root/myserve/serverstatus/client-linux.py SERVER=serverstatus.ahfei.blog USER=ahfei-${1} PASSWORD=A23456.. >/dev/null 2>&1" >> /var/spool/cron/crontabs/SkF%16_6 +echo "@reboot python3 ~${1}/myserve/serverstatus/client-linux.py SERVER=serverstatus.ahfei.blog USER=ahfei-${2} PASSWORD=A23456.. >/dev/null 2>&1" >> /var/spool/cron/crontabs/${1} echo "step 3: monitor has finished" @@ -58,4 +58,4 @@ echo "now geekbench5!" docker run -d -e MODE=standalone -p 88:80 -it adolfintel/speedtest echo "`ifconfig eth0 | head -n2 | grep inet | awk '{print$2}'`:88" >> result_geekbench5.txt -echo "step 4: test has finished" +echo "step 4: test has finished" \ No newline at end of file