Files
jd_wl_python/systemd/logistics@.service
2026-04-26 14:08:31 +08:00

34 lines
1.0 KiB
Desktop File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 物流抓取多实例模板:实例名为端口号,例如 logistics@5001.service
# 安装:
# sudo cp logistics@.service /etc/systemd/system/
# sudo systemctl daemon-reload
# sudo systemctl enable --now logistics@5001 logistics@5002 logistics@5003
# 若原先有独立的 logistics.service 也监听 5001请先 stop + disable避免双开同端口。
#
# 对应 Javajarvis.server.logistics.base-urls 列出上述端口。
[Unit]
Description=Logistics Fetch Service (port %i)
After=network.target
[Service]
Type=simple
User=van
Group=van
WorkingDirectory=/home/van/project/jd_python
ExecStart=/bin/bash /home/van/project/jd_python/run_logistics.sh
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=logistics-%i
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=PYTHONPATH=/home/van/project/jd_python
Environment=HOME=/home/van
Environment=LOGISTICS_PORT=%i
Environment=LOG_FILE=/home/van/project/jd_python/logistics-%i.log
[Install]
WantedBy=multi-user.target