1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 15:36:41 -05:00

release upload.sh in pre-build packages

This commit is contained in:
Darien Raymond 2018-07-17 13:30:51 +02:00
parent ed7036ac34
commit accc7813ef
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
3 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,7 @@ Restart=on-failure
RestartPreventExitStatus=23 # Configuration error
# After unexpected exit, upload latest V2Ray log to official log service for future analysis.
# Comment out the following line if you have privacy concerns.
ExecStopPost=journalctl -u v2ray --since today | curl -X PUT --upload-file "-" https://transfer.sh/v2ray.log | awk '{print "{\"value1\":\""$1"\"}"}' | curl --header "Content-Type: application/json" --request POST --data @- https://www.v2ray.com/logupload/
ExecStopPost=/usr/bin/v2ray/upload.sh
[Install]
WantedBy=multi-user.target

3
release/config/upload.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
journalctl -u v2ray --since today | curl -X PUT -s --upload-file "-" https://transfer.sh/v2ray.log | awk '{print "{\"value1\":\""$1"\"}"}' | curl -s --header "Content-Type: application/json" --request POST --data @- https://www.v2ray.com/logupload/

View File

@ -245,6 +245,7 @@ installV2Ray(){
copyFile v2ctl && makeExecutable v2ctl
copyFile geoip.dat
copyFile geosite.dat
copyFile upload.sh && makeExecutable upload.sh
# Install V2Ray server config to /etc/v2ray
if [[ ! -f "/etc/v2ray/config.json" ]]; then