📝 Update install.sh and Reduce update notification frequency. (#106)

* 📝 更新一键脚本。
* 📝 减少更新通知频率为 1次每天。

Co-authored-by: Xtao_dada <xtao@xtaolink.cn>
This commit is contained in:
F2DRD 2021-07-16 22:27:09 +08:00 committed by GitHub
parent 3521cd3806
commit 0d8ae9edaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -74,6 +74,7 @@ yum_python_check() {
echo "Python3.6 未安装在此系统上,正在进行安装"
yum install python3 -y >>/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 >>/dev/null 2>&1
PYV=$(which python3.6)
fi
if command -v pip3 >>/dev/null 2>&1; then
echo 'pip 存在 . . .'
@ -150,6 +151,7 @@ apt_python_check() {
apt-get update >>/dev/null 2>&1
apt-get install python3.6 -y >>/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 >>/dev/null 2>&1
PYV=$(which python3.6)
fi
if command -v pip3 >>/dev/null 2>&1; then
echo 'pip 存在 . . .'
@ -186,8 +188,8 @@ debian_python_check() {
make && make install >>/dev/null 2>&1
cd .. >>/dev/null 2>&1
rm -rf Python-3.6.5 Python-3.6.5.tar.gz >>/dev/null 2>&1
PYP=$(which python3.6)
update-alternatives --install $PYP python3 $PYV 1 >>/dev/null 2>&1
PYV=$(which python3.6)
update-alternatives --install /usr/bin/python3 python3 $PYV 1 >>/dev/null 2>&1
fi
fi
else
@ -202,8 +204,8 @@ debian_python_check() {
make && make install >>/dev/null 2>&1
cd .. >>/dev/null 2>&1
rm -rf Python-3.6.5 Python-3.6.5.tar.gz >>/dev/null 2>&1
PYP=$(which python3)
update-alternatives --install $PYP python3 $PYV 1 >>/dev/null 2>&1
PYV=$(which python3)
update-alternatives --install /usr/bin/python3 python3 $PYV 1 >>/dev/null 2>&1
fi
echo "正在检查 pip3 安装情况 . . ."
if command -v pip3 >>/dev/null 2>&1; then
@ -356,6 +358,8 @@ login_screen() {
screen -x -S userbot -p 0 -X stuff "$phonenum"
screen -x -S userbot -p 0 -X stuff $'\n'
sleep 2
if [ "$(ps -def | grep [p]agermaid | grep -v grep)" == "" ]; then
echo "手机号输入错误!请确认您是否带了区号(中国号码为 +86 如 +8618888888888"
screen -x -S userbot -p 0 -X stuff "cd /var/lib/pagermaid && $PYV -m pagermaid"

View File

@ -47,7 +47,7 @@ async def update_refresher(context):
need_update_check = True
if not need_update_check:
return
if time.time() - update_get_time > 3600:
if time.time() - update_get_time > 86400:
update_get_time = time.time()
changelog = None
try: