Create one-api.service
配置systemd守护进程
This commit is contained in:
parent
5cc19d911a
commit
2e47b780f7
13
one-api.service
Normal file
13
one-api.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=One API Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=yourusername #守护进程用户名
|
||||||
|
WorkingDirectory=/path/to/one-api #oneapi运行路径
|
||||||
|
ExecStart=/path/to/one-api/one-api --port 3000 --log-dir /path/to/one-api/logs #端口
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user