Skip to content

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

Merged
winlinvip merged 3 commits intoossrs:developfrom
winlinvip:feature/include-empty
Aug 28, 2023
Merged

Support include empty config file. v5.0.173 v6.0.68#3768
winlinvip merged 3 commits intoossrs:developfrom
winlinvip:feature/include-empty

Conversation

@winlinvip
Copy link
Copy Markdown
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 force-pushed the feature/include-empty branch from 310b9f6 to a6f0a31 Compare August 22, 2023 01:35
@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 force-pushed the feature/include-empty branch from f1e67a2 to a6f0a31 Compare August 28, 2023 01:48
@winlinvip winlinvip force-pushed the feature/include-empty branch from 7e4cc0b to b97b4dd Compare August 28, 2023 02:07
@winlinvip winlinvip force-pushed the feature/include-empty branch from b97b4dd to 40171f5 Compare August 28, 2023 02:09
@winlinvip winlinvip merged commit 4d15dad into ossrs:develop Aug 28, 2023
@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.

Development

Successfully merging this pull request may close these issues.

2 participants