[Feature Addition] Introducing the --logrotate Option for Xray's Enhanced Log Rotation (#62)

* [Feat] Add Option To Install with Logrotate

* Update: Using built-in user detection

* Changes:
1.Default retention time
2.Check Logrotate after Check User

https://github.com/XTLS/Xray-core/discussions/2369#discussioncomment-6554217
This commit is contained in:
Koinu
2023-07-31 11:41:30 +08:00
committed by GitHub
parent 9af684cf00
commit b6942b91c9
2 changed files with 87 additions and 0 deletions

View File

@@ -48,6 +48,18 @@ Notice: Xray will NOT log to `/var/log/xray/*.log` by default. Configure `"log"`
# bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install --beta
```
**Install & Upgrade Xray-core and geodata with `logrotate`**
```
# bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install --logrotate
```
```
installed: /etc/systemd/system/logrotate@.service
installed: /etc/systemd/system/logrotate@.timer
installed: /etc/logrotate.d/xray
```
**Install & Upgrade Xray-core and geodata with `User=root`, which will overwrite `User` in existing service files**
```