fix: Missing Log Source

1. Now, the initialization of the Log file is normal.
2. And, some new related outputs have been added.
pull/45/head
Dct Mei 2020-08-15 19:52:53 +08:00
parent e6bd2e5f21
commit 46ccbf0bd8
No known key found for this signature in database
GPG Key ID: 50BF8B712DCAD7EA
2 changed files with 8 additions and 4 deletions

View File

@ -22,6 +22,8 @@ installed: /usr/local/etc/v2ray/07_transport.json
installed: /usr/local/etc/v2ray/08_stats.json
installed: /usr/local/etc/v2ray/09_reverse.json
installed: /var/log/v2ray/
installed: /var/log/v2ray/access.log
installed: /var/log/v2ray/error.log
installed: /etc/systemd/system/v2ray.service
installed: /etc/systemd/system/v2ray@.service
```

View File

@ -370,12 +370,12 @@ install_v2ray() {
if [[ ! -d '/var/log/v2ray/' ]]; then
if [[ -n "$(id nobody | grep nogroup)" ]]; then
install -d -m 700 -o nobody -g nogroup /var/log/v2ray/
install -m 600 -o nobody -g nogroup /var/log/v2ray/access.log
install -m 600 -o nobody -g nogroup /var/log/v2ray/error.log
install -m 600 -o nobody -g nogroup /dev/null /var/log/v2ray/access.log
install -m 600 -o nobody -g nogroup /dev/null /var/log/v2ray/error.log
else
install -d -m 700 -o nobody -g nobody /var/log/v2ray/
install -m 600 -o nobody -g nobody /var/log/v2ray/access.log
install -m 600 -o nobody -g nobody /var/log/v2ray/error.log
install -m 600 -o nobody -g nobody /dev/null /var/log/v2ray/access.log
install -m 600 -o nobody -g nobody /dev/null /var/log/v2ray/error.log
fi
LOG='1'
fi
@ -562,6 +562,8 @@ main() {
fi
if [[ "$LOG" -eq '1' ]]; then
echo 'installed: /var/log/v2ray/'
echo 'installed: /var/log/v2ray/access.log'
echo 'installed: /var/log/v2ray/error.log'
fi
if [[ "$SYSTEMD" -eq '1' ]]; then
echo 'installed: /etc/systemd/system/v2ray.service'