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
parent
e6bd2e5f21
commit
46ccbf0bd8
|
@ -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/08_stats.json
|
||||||
installed: /usr/local/etc/v2ray/09_reverse.json
|
installed: /usr/local/etc/v2ray/09_reverse.json
|
||||||
installed: /var/log/v2ray/
|
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
|
||||||
installed: /etc/systemd/system/v2ray@.service
|
installed: /etc/systemd/system/v2ray@.service
|
||||||
```
|
```
|
||||||
|
|
|
@ -370,12 +370,12 @@ install_v2ray() {
|
||||||
if [[ ! -d '/var/log/v2ray/' ]]; then
|
if [[ ! -d '/var/log/v2ray/' ]]; then
|
||||||
if [[ -n "$(id nobody | grep nogroup)" ]]; then
|
if [[ -n "$(id nobody | grep nogroup)" ]]; then
|
||||||
install -d -m 700 -o nobody -g nogroup /var/log/v2ray/
|
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 /dev/null /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/error.log
|
||||||
else
|
else
|
||||||
install -d -m 700 -o nobody -g nobody /var/log/v2ray/
|
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 /dev/null /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/error.log
|
||||||
fi
|
fi
|
||||||
LOG='1'
|
LOG='1'
|
||||||
fi
|
fi
|
||||||
|
@ -562,6 +562,8 @@ main() {
|
||||||
fi
|
fi
|
||||||
if [[ "$LOG" -eq '1' ]]; then
|
if [[ "$LOG" -eq '1' ]]; then
|
||||||
echo 'installed: /var/log/v2ray/'
|
echo 'installed: /var/log/v2ray/'
|
||||||
|
echo 'installed: /var/log/v2ray/access.log'
|
||||||
|
echo 'installed: /var/log/v2ray/error.log'
|
||||||
fi
|
fi
|
||||||
if [[ "$SYSTEMD" -eq '1' ]]; then
|
if [[ "$SYSTEMD" -eq '1' ]]; then
|
||||||
echo 'installed: /etc/systemd/system/v2ray.service'
|
echo 'installed: /etc/systemd/system/v2ray.service'
|
||||||
|
|
Loading…
Reference in New Issue