📦 | simplify corsproxy.service
This commit is contained in:
@@ -1,18 +1,3 @@
|
|||||||
# /etc/systemd/system/corsproxy.service
|
|
||||||
#
|
|
||||||
# Systemd unit for the Unsloth Studio CORS proxy.
|
|
||||||
#
|
|
||||||
# Installation:
|
|
||||||
# sudo cp corsproxy.service /etc/systemd/system/
|
|
||||||
# sudo systemctl daemon-reload
|
|
||||||
# sudo systemctl enable corsproxy.service # start on boot
|
|
||||||
# sudo systemctl start corsproxy.service # start now
|
|
||||||
#
|
|
||||||
# Management:
|
|
||||||
# sudo systemctl status corsproxy.service # view status
|
|
||||||
# sudo journalctl -u corsproxy.service -f # follow logs
|
|
||||||
# sudo systemctl restart corsproxy.service # restart
|
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Unsloth Studio CORS Proxy
|
Description=Unsloth Studio CORS Proxy
|
||||||
Documentation=https://github.com/NikkeDoy/CORSProxy
|
Documentation=https://github.com/NikkeDoy/CORSProxy
|
||||||
@@ -23,28 +8,11 @@ Type=simple
|
|||||||
ExecStart=/usr/bin/python3 /opt/CORSProxy/main.py --target 127.0.0.1:8888 --listen 8080
|
ExecStart=/usr/bin/python3 /opt/CORSProxy/main.py --target 127.0.0.1:8888 --listen 8080
|
||||||
WorkingDirectory=/opt/CORSProxy
|
WorkingDirectory=/opt/CORSProxy
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
# --- Hardening ---
|
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
ProtectSystem=strict
|
ProtectSystem=strict
|
||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
ReadWritePaths=/var/log/corsproxy
|
|
||||||
CapabilityBoundingSet=
|
CapabilityBoundingSet=
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
|
|
||||||
# --- Tunable ---
|
|
||||||
# Override by creating a drop-in:
|
|
||||||
# sudo systemctl edit corsproxy.service
|
|
||||||
#
|
|
||||||
# Add:
|
|
||||||
# [Service]
|
|
||||||
# ExecStart=
|
|
||||||
# ExecStart=/usr/bin/python3 /opt/CORSProxy/main.py --target 10.0.0.5:8000 --listen 9090
|
|
||||||
|
|
||||||
# --- Restart limiter ---
|
|
||||||
StartLimitIntervalSec=300
|
|
||||||
StartLimitBurst=5
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Reference in New Issue
Block a user