From ed7036ac34a30d8ca61c88e6d56b1e8cda602fc3 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 17 Jul 2018 13:11:46 +0200 Subject: [PATCH] auto-upload crash log --- release/config/systemd/v2ray.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/config/systemd/v2ray.service b/release/config/systemd/v2ray.service index 3e52a0a35..8895e2d7e 100644 --- a/release/config/systemd/v2ray.service +++ b/release/config/systemd/v2ray.service @@ -14,6 +14,9 @@ PIDFile=/var/run/v2ray.pid ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json 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/ [Install] WantedBy=multi-user.target