Files
openapi/systemd/pixiv-token-refresh.service
T
RRRosmontis 74a90d6190 新增 Pixiv token 刷新守护:每 30-60 分钟随机续期,refresh_token 轮换原子落盘
- refresh_token.py:启动即刷新,random 30~60min 循环,失败 5min 重试
- 每次保存新 access_token+refresh_token(Pixiv 会轮换),chmod 600
- pixiv-token-refresh.service:常驻守护,Restart=always
- README 同步服务清单与部署说明
2026-09-02 18:54:19 +08:00

19 lines
605 B
Desktop File

[Unit]
Description=Pixiv Token Refresh Daemon
After=network-online.target
Wants=network-online.target
[Service]
Environment=PATH=/home/openapi/env/general/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
Type=simple
WorkingDirectory=/home/openapi/source/pixiv
ExecStart=/home/openapi/env/general/bin/python /home/openapi/source/pixiv/refresh_token.py
Restart=always
RestartSec=30
StandardOutput=append:/var/log/pixiv_token_refresh.log
StandardError=append:/var/log/pixiv_token_refresh.log
[Install]
WantedBy=multi-user.target