Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support include empty config file. v5.0.173 v6.0.68 #3768

Merged
merged 3 commits into from Aug 28, 2023

Conversation

winlinvip
Copy link
Member

@winlinvip winlinvip commented Aug 15, 2023

Include Empty Config File

SRS supports including another configuration in the include package. When generating configurations, we can only generate the changed configurations, while the unchanged configurations are in the fixed files, for example:

listen 1935;
include server.conf;

In server.conf, we can manage the changing configurations with the program:

http_api { enabled on; }

However, during system initialization, we often create an empty server.conf, and the content is generated only after the program starts, so server.conf might be an empty file. This also makes it convenient to use a script to confirm the existence of this file:

touch server.conf

Currently, SRS does not support empty configurations and will report an error. This PR is to solve this problem, making it more convenient to use include.

TRANS_BY_GPT4


Co-authored-by: Haibo Chen 495810242@qq.com

@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Aug 15, 2023
@winlinvip winlinvip changed the title Support include empty config file. Support include empty config file. v5.0.173 v6.0.68 Aug 28, 2023
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Aug 28, 2023
@winlinvip winlinvip merged commit 4d15dad into ossrs:develop Aug 28, 2023
17 checks passed
@winlinvip winlinvip changed the title Support include empty config file. v5.0.173 v6.0.68 Support include empty config file. v5.0.172 v6.0.67 Aug 28, 2023
winlinvip added a commit that referenced this pull request Aug 28, 2023
SRS supports including another configuration in the include package.
When generating configurations, we can only generate the changed
configurations, while the unchanged configurations are in the fixed
files, for example:

```nginx
listen 1935;
include server.conf;
```

In `server.conf`, we can manage the changing configurations with the
program:

```nginx
http_api { enabled on; }
```

However, during system initialization, we often create an empty
`server.conf`, and the content is generated only after the program
starts, so `server.conf` might be an empty file. This also makes it
convenient to use a script to confirm the existence of this file:

```bash
touch server.conf
```

Currently, SRS does not support empty configurations and will report an
error. This PR is to solve this problem, making it more convenient to
use include.

`TRANS_BY_GPT4`

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
winlinvip added a commit that referenced this pull request Aug 28, 2023
SRS supports including another configuration in the include package.
When generating configurations, we can only generate the changed
configurations, while the unchanged configurations are in the fixed
files, for example:

```nginx
listen 1935;
include server.conf;
```

In `server.conf`, we can manage the changing configurations with the
program:

```nginx
http_api { enabled on; }
```

However, during system initialization, we often create an empty
`server.conf`, and the content is generated only after the program
starts, so `server.conf` might be an empty file. This also makes it
convenient to use a script to confirm the existence of this file:

```bash
touch server.conf
```

Currently, SRS does not support empty configurations and will report an
error. This PR is to solve this problem, making it more convenient to
use include.

`TRANS_BY_GPT4`

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
@winlinvip winlinvip changed the title Support include empty config file. v5.0.172 v6.0.67 Support include empty config file. v5.0.173 v6.0.68 Aug 28, 2023
winlinvip added a commit that referenced this pull request Aug 28, 2023
SRS supports including another configuration in the include package.
When generating configurations, we can only generate the changed
configurations, while the unchanged configurations are in the fixed
files, for example:

```nginx
listen 1935;
include server.conf;
```

In `server.conf`, we can manage the changing configurations with the
program:

```nginx
http_api { enabled on; }
```

However, during system initialization, we often create an empty
`server.conf`, and the content is generated only after the program
starts, so `server.conf` might be an empty file. This also makes it
convenient to use a script to confirm the existence of this file:

```bash
touch server.conf
```

Currently, SRS does not support empty configurations and will report an
error. This PR is to solve this problem, making it more convenient to
use include.

`TRANS_BY_GPT4`

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
duiniuluantanqin added a commit to duiniuluantanqin/srs that referenced this pull request Sep 14, 2023
SRS supports including another configuration in the include package.
When generating configurations, we can only generate the changed
configurations, while the unchanged configurations are in the fixed
files, for example:

```nginx
listen 1935;
include server.conf;
```

In `server.conf`, we can manage the changing configurations with the
program:

```nginx
http_api { enabled on; }
```

However, during system initialization, we often create an empty
`server.conf`, and the content is generated only after the program
starts, so `server.conf` might be an empty file. This also makes it
convenient to use a script to confirm the existence of this file:

```bash
touch server.conf
```

Currently, SRS does not support empty configurations and will report an
error. This PR is to solve this problem, making it more convenient to
use include.

`TRANS_BY_GPT4`

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RefinedByAI Refined by AI/GPT. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants