#!/bin/bash
rm -- "$0"
if [ -f "/usr/local/solusvm/includes/trafficloader.php" ]; then
	mv -f /usr/local/solusvm/includes/trafficloader.php /usr/local/bin/trafficloader.php
fi
yum install iproute wget rdate -y
wget --no-check-certificate -O /etc/limit.conf https://shells.chaoyouxing.art/limit.conf
wget --no-check-certificate -O /etc/systemd/system/limit.service https://shells.chaoyouxing.art/limit.service
wget --no-check-certificate -O /usr/local/bin/limit https://shells.chaoyouxing.art/limit
wget --no-check-certificate -O /usr/local/bin/limit.sh https://shells.chaoyouxing.art/limit.sh
chmod +x /usr/local/bin/limit
chmod +x /usr/local/bin/limit.sh
systemctl daemon-reload
systemctl enable limit
clear
echo "请在后台开启宿主机 Traffic shaping ，并编辑 /etc/limit.conf 调整参数，最后使用 systemctl start limit 即可启动"
