screenshot
install
#CentOS 7 system yum install wget crontabs -y #Debian and Ubuntu systems apt install cron -y
#Download client wget http://appdown.rrys.tv/rrshareweb_centos7.tar.gz #Decompress tar -zxvf rrshareweb_centos7.tar.gz #Delete useless files rm -rf rrshareweb*.tar.gz #Run Client cd rrshareweb ./rrshareweb
#CentOS 7 system firewall-cmd --zone=public --add-port=3001/tcp --permanent firewall-cmd --reload
#The following command is copied to the SSH client to run cat > /etc/systemd/system/renren.service <<EOF [Unit] Description=RenRen server After=network.target Wants=network.target [Service] Type=simple PIDFile=/var/run/renren.pid ExecStart=/root/rrshareweb/rrshareweb RestartPreventExitStatus=23 Restart=always User=root [Install] WantedBy=multi-user.target EOF
systemctl start renren
systemctl status renren
systemctl enable renren
Configuration upload
#CentOS system wget https://www.moerats.com/usr/shell/Python3/CentOS_Python3.6.sh && sh CentOS_Python3.6.sh #Debian system wget https://www.moerats.com/usr/shell/Python3/Debian_Python3.6.sh && sh Debian_Python3.6.sh #Since Ubuntu 16+comes with Python 3, you only need to install pip3 apt install python3-pip -y
pip3 install requests
#Create a new folder to store the upload script mkdir /root/upod #Create a new detection script check.py, fill in your client running port and unlock password, and then copy them to the ssh client to run cat > /root/upod/check.py <<EOF # -*- coding: utf-8 -* import requests import os ip="127.0.0.1" Port="Your port" Passwd="Your unlock password" url="http://"+str(ip)+":"+str(port)+"/api/unlock?passwd="+str(passwd) workingtaskurl="http://"+str(ip)+":"+str(port)+"/api/workingtask" finishedtaskurl="http://"+str(ip)+":"+str(port)+"/api/finishedtask" deletetaskurl="http://"+str(ip)+":"+str(port)+"/api/deletetask" s=requests.session() s.get(url=url) c=s.get(workingtaskurl).text d=s.get(finishedtaskurl) dict=(eval(d.text)) for i in dict['tasks']: ids=i['file_id'] filename=i['file_name'] os.system("bash /root/upod/work.sh "+"\""+filename+"\"") data={ 'ids':'["'+ids+'"]', 'delfile':1 } s.post(deletetaskurl,data=data) print("task finish") EOF
nano /root/upod/work.sh
#!/ bin/bash time=$(date "+%Y%m%d%H%M%S") filename=${time}${1} #time=$(date "+%Y%m%d-%H%M%S") filedir=${filename}${time} echo "$filedir" echo "$filename" mkdir -p /temp/"$filedir"/ mv /root/down/"$1" /temp/"$filedir"/"$filename" eval onedrive-d \'/temp/"$filedir"\' rm -rf /temp/"$filedir" rm -rf /root/down/mask/
python3 /root/upod/check.py
#Set to execute every minute echo "*/1 * * * * python3 /root/upod/check.py" > bt.cron crontab bt.cron rm -rf bt.cron
Tips
#PyOne Manual installation: https://www.moerats.com/archives/734/ Script installation: https://www.moerats.com/archives/806/ Docker installation: https://www.moerats.com/archives/799/ #OneIndex Manual installation: https://www.moerats.com/archives/592/ Script installation: https://www.moerats.com/archives/692/ #OLAINDEX Manual installation: https://www.moerats.com/archives/765/
Reference link
Film and television installation: https://www.abbeyok.com/archives/213 Upload script: https://blog.mark56.cn/archives/101/
Copyright notice: This is an original article, and the copyright belongs to Rat's Blog All, please indicate the source for reprinting!
Link to this article: https://www.moerats.com/archives/813/
If the tutorial needs to be updated, or 404 appears on the related link, you can leave a comment below the article.