[GH-ISSUE #2327] 請教如何使用原帶的systemd #1843

Closed
opened 2026-05-05 13:11:33 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @tsinit2001 on GitHub (Mar 23, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2327

我的運行環境是一臺公網的VPS和一個放在家裏路由器下面的玩客雲。
VPS上安裝服務器端,正常。
家裏的玩客雲,供電不穩定,所以在手工啓動frp後,希望改成開機自啓動。
看到原版就帶了systemd的配置文件,就啓用了。
但是每次運行,都會提示錯誤,無法自動啓動。
我的安裝目錄是/root/frp/
所以,我把frpc.service中的目錄,進行了對應的修改:
[Unit]
Description=Frp Client Service
After=network.target

[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/root/frp/frpc -c /root/frp/frpc.ini
ExecReload=/root/frp/frpc reload -c /root/frp/frpc.ini

[Install]
WantedBy=multi-user.target

但是現在依然不能正常運行,提示信息是:
systemctl status frpc.service
● frpc.service - Frp Client Service
Loaded: loaded (/usr/lib/systemd/system/frpc.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2021-03-24 05:52:26 HKT; 559ms ago
Process: 2426 ExecStart=/root/frp/frpc -c /root/frp/frpc.ini (code=exited, status=203/EXEC)
Main PID: 2426 (code=exited, status=203/EXEC)

請問,還有哪裏是需要進行修改的?

Originally created by @tsinit2001 on GitHub (Mar 23, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2327 我的運行環境是一臺公網的VPS和一個放在家裏路由器下面的玩客雲。 VPS上安裝服務器端,正常。 家裏的玩客雲,供電不穩定,所以在手工啓動frp後,希望改成開機自啓動。 看到原版就帶了systemd的配置文件,就啓用了。 但是每次運行,都會提示錯誤,無法自動啓動。 我的安裝目錄是/root/frp/ 所以,我把frpc.service中的目錄,進行了對應的修改: [Unit] Description=Frp Client Service After=network.target [Service] Type=simple User=nobody Restart=on-failure RestartSec=5s ExecStart=/root/frp/frpc -c /root/frp/frpc.ini ExecReload=/root/frp/frpc reload -c /root/frp/frpc.ini [Install] WantedBy=multi-user.target 但是現在依然不能正常運行,提示信息是: systemctl status frpc.service ● frpc.service - Frp Client Service Loaded: loaded (/usr/lib/systemd/system/frpc.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Wed 2021-03-24 05:52:26 HKT; 559ms ago Process: 2426 ExecStart=/root/frp/frpc -c /root/frp/frpc.ini (code=exited, status=203/EXEC) Main PID: 2426 (code=exited, status=203/EXEC) 請問,還有哪裏是需要進行修改的?
Author
Owner

@tsinit2001 commented on GitHub (Mar 23, 2021):

是我疏忽了,沒有改好frpc@.service的緣故。
已經做了對應的修改,目前正常了。
抱歉打擾了。

<!-- gh-comment-id:805301722 --> @tsinit2001 commented on GitHub (Mar 23, 2021): 是我疏忽了,沒有改好frpc@.service的緣故。 已經做了對應的修改,目前正常了。 抱歉打擾了。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1843
No description provided.