[GH-ISSUE #925] 你好,请问FRP的systemd该怎么写? #734

Closed
opened 2026-05-05 12:28:18 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @wztx on GitHub (Sep 18, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/925

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?

What operating system and processor architecture are you using (go env)?

Configures you used:

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)
如题,请问该如何配置运行服务文件?

Originally created by @wztx on GitHub (Sep 18, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/925 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** **What operating system and processor architecture are you using (`go env`)?** **Configures you used:** **Steps to reproduce the issue:** 1. 2. 3. **Describe the results you received:** **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)** 如题,请问该如何配置运行服务文件?
Author
Owner

@honwen commented on GitHub (Sep 18, 2018):

For reference only:

[Unit]
Description=FRP-Server
After=network-online.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/frps -c /usr/share/frp/frps_full.ini

[Install]
WantedBy=multi-user.target
<!-- gh-comment-id:422277298 --> @honwen commented on GitHub (Sep 18, 2018): For reference only: ```INI [Unit] Description=FRP-Server After=network-online.target [Service] Type=simple Restart=always ExecStart=/usr/bin/frps -c /usr/share/frp/frps_full.ini [Install] WantedBy=multi-user.target ```
Author
Owner

@wannianma commented on GitHub (Oct 19, 2018):

@chenhw2 Thanks for the conf demo. Why type is simple, not forking?

<!-- gh-comment-id:431300285 --> @wannianma commented on GitHub (Oct 19, 2018): @chenhw2 Thanks for the conf demo. Why type is simple, not forking?
Author
Owner

@honwen commented on GitHub (Oct 19, 2018):

@wannianma

Refer: https://superuser.com/questions/1274901/systemd-forking-vs-simple/1274913

a) If the service starts and keeps running, and the prompt does not return until you press Control-C or stop the service in some other way: then Type = simple is the right choice.

b) If the prompt returns but the service keeps running in the background (i.e. the service daemonizes itself on its own), then Type = forking is the right choice.

<!-- gh-comment-id:431301301 --> @honwen commented on GitHub (Oct 19, 2018): @wannianma Refer: https://superuser.com/questions/1274901/systemd-forking-vs-simple/1274913 > a) If the service starts and keeps running, and the prompt does not return until you press Control-C or stop the service in some other way: then Type = simple is the right choice. > > b) If the prompt returns but the service keeps running in the background (i.e. the service daemonizes itself on its own), then Type = forking is the right choice.
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#734
No description provided.