diff options
author | DuckSoft | 2020-05-21 14:38:43 +0800 |
---|---|---|
committer | DuckSoft | 2020-05-21 14:38:43 +0800 |
commit | 75fd049f17e6c9db896a7f8d2e46b51fbf69256f (patch) | |
tree | 6492c6829a7899d3701b2d58794323e4117f5dd0 /v2ray-cap.sh | |
parent | c2e4a1337e9a2b2d2b95d31a09fd60959dace5df (diff) | |
download | aur-75fd049f17e6c9db896a7f8d2e46b51fbf69256f.tar.gz |
rewrite
Diffstat (limited to 'v2ray-cap.sh')
-rwxr-xr-x | v2ray-cap.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/v2ray-cap.sh b/v2ray-cap.sh new file mode 100755 index 000000000000..872d4a6b9bef --- /dev/null +++ b/v2ray-cap.sh @@ -0,0 +1,11 @@ +#/bin/sh + +post_install() { + echo 'Granting Capabilities to V2Ray Core...' + /usr/bin/setcap 'cap_net_bind_service=+ep cap_net_admin=+ep' /usr/lib/v2ray/v2ray +} + +post_remove() { + echo 'Revoking Capabilities from V2Ray Core...' + /usr/bin/setcap 'cap_net_bind_service=-ep cap_net_admin=-ep' /usr/lib/v2ray/v2ray +} |