Skip to content
Snippets Groups Projects
linux.sh 566 B
Newer Older
Xin-Hao Zhu's avatar
Xin-Hao Zhu committed
#!/bin/bash

# Set proxy settings
Xin-Hao Zhu's avatar
Xin-Hao Zhu committed
export http_proxy=http://proxy.zhuxh.cloud:5868
export https_proxy=http://proxy.zhuxh.cloud:5868
export all_proxy=http://proxy.zhuxh.cloud:5868

Xin-Hao Zhu's avatar
Xin-Hao Zhu committed
# Terminate existing processes
Xin-Hao Zhu's avatar
Xin-Hao Zhu committed
screen -S client -X quit
pkill -f "python start_client.py"
pkill -f "python getstat.py"

Xin-Hao Zhu's avatar
Xin-Hao Zhu committed
# Remove existing directory and clone repository
Xin-Hao Zhu's avatar
Xin-Hao Zhu committed
rm -rf mtcmon-rev
git clone https://git.nju.edu.cn/zhuxh/mtcmon-rev.git
cd mtcmon-rev

Xin-Hao Zhu's avatar
Xin-Hao Zhu committed
# Start the Python script in the background
Xin-Hao Zhu's avatar
Xin-Hao Zhu committed
nohup python start_client.py > start_client.log 2>&1 &

echo "start_client.py started"