feat: sudo cpxy upgrade 一条命令在线增量升级

This commit is contained in:
Hermes
2026-07-21 14:19:26 +00:00
commit 936ce04403
20 changed files with 3477 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
[Unit]
Description=cellular-proxy admin API (proxy auth config)
After=network-online.target cellular-proxy.service
Wants=network-online.target
[Service]
Type=simple
Environment=INSTALL_DIR=@INSTALL_DIR@
Environment=CPXY_SETTINGS=@INSTALL_DIR@/etc/settings.conf
Environment=CPXY_APPLY_AUTH=@INSTALL_DIR@/scripts/apply-proxy-auth.sh
Environment=ADMIN_LISTEN_HOST=0.0.0.0
Environment=ADMIN_LISTEN_PORT=9091
ExecStart=/usr/bin/python3 @INSTALL_DIR@/scripts/admin-api.py
Restart=on-failure
RestartSec=2
NoNewPrivileges=true
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
ReadWritePaths=@INSTALL_DIR@ /var/lib/cellular-proxy /var/log/cellular-proxy
User=root
[Install]
WantedBy=multi-user.target