小更新
This commit is contained in:
parent
514a0131c9
commit
1135e05b7b
@ -20,7 +20,7 @@ def get_core_config():
|
||||
debug = config.get('debug', 'False') # 使用 get 方法提供默认值
|
||||
if str(debug).lower() == "true": # 统一转换为小写进行比较
|
||||
logger.debug("Debug mode is on")
|
||||
logger.debug(f"Loaded config: {config}") # 输出加载的配置
|
||||
# logger.debug(f"Loaded config: {config}") # 输出加载的配置,可能导致密钥泄露,请勿取消注释
|
||||
|
||||
time_choice = int(f"{config['time_mode']}")
|
||||
choice = config['mode'] # 假设 mode 是一个列表
|
||||
|
||||
@ -556,7 +556,7 @@ if ($db) {
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>资讯推送Web端</title>
|
||||
<title>SecPulse Web端</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
|
||||
<link rel="shortcut icon" href="./static/favicon.ico" type="image/x-icon">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui-src/dist/css/layui.css">
|
||||
|
||||
20
install.sh
20
install.sh
@ -5,6 +5,16 @@ set -e
|
||||
BASE_DIR=$(cd "$(dirname "$0")"; pwd)
|
||||
USER_NAME=$(whoami)
|
||||
|
||||
ehco -e "███████ ███████ ██████ ██████ ██ ██ ██ ███████ ███████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
███████ █████ ██ ██████ ██ ██ ██ ███████ █████
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
███████ ███████ ██████ ██ ██████ ███████ ███████ ███████
|
||||
|
||||
"
|
||||
|
||||
echo "欢迎使用 SecPulse 赛博脉动监控推送系统"
|
||||
|
||||
echo "项目路径: $BASE_DIR"
|
||||
|
||||
# 检测 Python
|
||||
@ -45,9 +55,9 @@ else
|
||||
fi
|
||||
|
||||
# 创建 systemd 服务
|
||||
sudo tee /etc/systemd/system/PyBot.service > /dev/null <<EOF
|
||||
sudo tee /etc/systemd/system/secpulse.service > /dev/null <<EOF
|
||||
[Unit]
|
||||
Description=PyBot Core Service
|
||||
Description=SecPulse Core Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
@ -65,11 +75,11 @@ EOF
|
||||
|
||||
# 重载并启动服务
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now PyBot
|
||||
sudo systemctl enable --now secpulse
|
||||
|
||||
echo ""
|
||||
echo "===================================="
|
||||
echo "✅ PyBot 服务已安装并启动"
|
||||
echo "📄 日志查看: sudo journalctl -u PyBot -f"
|
||||
echo "✅ SecPulse 服务已安装并启动"
|
||||
echo "📄 日志查看: sudo journalctl -u SecPulse -f"
|
||||
echo "🌐 访问 index.php 获取网页服务"
|
||||
echo "===================================="
|
||||
3
log.php
3
log.php
@ -32,7 +32,8 @@ $lastModified = file_exists($logFile) ? date("Y-m-d H:i:s", filemtime($logFile))
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>程序运行日志</title>
|
||||
<link rel="shortcut icon" href="./static/favicon.ico" type="image/x-icon">
|
||||
<title>SecPulse运行日志</title>
|
||||
<!-- 引入 Layui 的 CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui-src/dist/css/layui.css">
|
||||
<style>
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
|
||||
set -e
|
||||
|
||||
SERVICES=("PyBot")
|
||||
SERVICES=("secpulse")
|
||||
|
||||
echo "=============================="
|
||||
echo "开始卸载 PyBot 服务"
|
||||
echo "开始卸载 SecPulse 服务"
|
||||
echo "=============================="
|
||||
|
||||
for SERVICE in "${SERVICES[@]}"; do
|
||||
@ -64,4 +64,4 @@ for SERVICE in "${SERVICES[@]}"; do
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "感谢使用 PyBot!👋"
|
||||
echo "感谢使用 SecPulse 赛博脉动监控推送系统!👋"
|
||||
Loading…
Reference in New Issue
Block a user