From 47c88140c3026201badc331cbac66c46f8428453 Mon Sep 17 00:00:00 2001 From: Pyhtagodzilla <1670671958@qq.com> Date: Wed, 18 Jun 2025 22:34:26 +0800 Subject: [PATCH] Complement the README file. --- Authtication.py | 1 - README.md | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Authtication.py b/Authtication.py index 0f6baea..5d2c154 100644 --- a/Authtication.py +++ b/Authtication.py @@ -2,7 +2,6 @@ import os import requests import time import selenium.common.exceptions -import urllib3 import logging from dotenv import load_dotenv from selenium import webdriver diff --git a/README.md b/README.md index 7699f17..722fea2 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,23 @@ BUCT_AUTHENTICATION_PASSWORD=校园网密码 ## 关于service 由于用到了logging。所以service里面要加上`WorkingDirectory=/path/to/programe`来确保文件可以正常写入 。 -出错先找找权限问题,我应该是直接给了755。 +出错先找找权限问题,我应该是直接给了755。这里是一个servivce的配置文件例子。 +```YAML +[Unit] + Description=Auto authentication. + After=network-online.target + +[Service] + Type=simple + ExecStart=/path/to/your/python /path/to/your/program + WorkingDirectory=/path/to/your/program + User=Your_User + Restart=always + RestartSec=60 + +[Install] + WantedBy=multi-user.target +``` ---