summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2016-01-08 10:47:00 +0800
committerYixun Lan <dlan@gentoo.org>2016-01-08 10:47:00 +0800
commit3f35a7ae49c6d6e95b64ed4e5f585e8f200b6448 (patch)
tree9693ce14d4557ae4fd7870c48bf3aa7bd4a954df /net-proxy/shadowsocks-libev/files
parentapp-text/liblangtag: Version bump (diff)
downloadgentoo-3f35a7ae49c6d6e95b64ed4e5f585e8f200b6448.tar.gz
gentoo-3f35a7ae49c6d6e95b64ed4e5f585e8f200b6448.tar.bz2
gentoo-3f35a7ae49c6d6e95b64ed4e5f585e8f200b6448.zip
net-proxy/shadowsocks-libev: systemd support added
thanks 'Jiajun Wang' for contribution Package-Manager: portage-2.2.26
Diffstat (limited to 'net-proxy/shadowsocks-libev/files')
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service11
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service11
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service11
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service11
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks.initd12
5 files changed, 55 insertions, 1 deletions
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service
new file mode 100644
index 00000000000..af137178380
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service for %I
+After=network.target
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service
new file mode 100644
index 00000000000..1ced8f45440
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service Redir Mode for %I
+After=network.target
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks-libev/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service
new file mode 100644
index 00000000000..58d934bdb1d
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Shadowsocks-Libev Server Service for %I
+After=network.target
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service
new file mode 100644
index 00000000000..24b31d5a1cd
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service Tunnel Mode for %I
+After=network.target
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks-libev/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks.initd b/net-proxy/shadowsocks-libev/files/shadowsocks.initd
index d32e6df9a91..f6a8067eca9 100644
--- a/net-proxy/shadowsocks-libev/files/shadowsocks.initd
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks.initd
@@ -3,7 +3,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-SS_CONFIG="/etc/shadowsocks.json"
+SS_CONFIG="/etc/shadowsocks-libev/shadowsocks.json"
SS_PIDFILE="/run/shadowsocks.pid"
@@ -26,10 +26,20 @@ checkconfig() {
SS_COMMAND="/usr/bin/ss-server"
return 0
;;
+ redir)
+ SS_COMMAND="/usr/bin/ss-redir"
+ return 0
+ ;;
+ tunnel)
+ SS_COMMAND="/usr/bin/ss-tunnel"
+ return 0
+ ;;
*)
eerror "please choose to run as server or client mode"
eerror " server: rc-update add shadowsocks.server default"
eerror " client: rc-update add shadowsocks.client default"
+ eerror " client: rc-update add shadowsocks.redir default"
+ eerror " client: rc-update add shadowsocks.tunnel default"
return 1
;;
esac