From b8f4a6b806ecaf157cb5e4f822c7a5c2d34bdf09 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 24 Jun 2018 17:08:54 +0800 Subject: shadowsocks: Support multiple instances (share with others) Add the "shadowsocks" rc script that allows multiple instances (based on the uwsgi rc script). Update the role and vars to setup two shadowsocks instances. --- roles/shadowsocks/files/shadowsocks | 100 ++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 roles/shadowsocks/files/shadowsocks (limited to 'roles/shadowsocks/files') diff --git a/roles/shadowsocks/files/shadowsocks b/roles/shadowsocks/files/shadowsocks new file mode 100644 index 0000000..4dcf706 --- /dev/null +++ b/roles/shadowsocks/files/shadowsocks @@ -0,0 +1,100 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Aaron LI +# 2018-06-24 +# +# PROVIDE: shadowsocks +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable shadowsocks: +# +# shadowsocks_enable (bool): Set it to "YES" to enable shadowsocks +# Default is "NO". +# shadowsocks_config (path): Set the path to the config file +# Default is "/usr/local/etc/shadowsocks-libev/config.json", +# or "/usr/local/etc/shadowsocks-libev/${profile}.json". +# shadowsocks_pidfile (path): Set the path to the pid file +# Default is "/var/run/shadowsocks.pid", or +# "/var/run/shadowsocks-${profile}.pid". +# shadowsocks_mode (str): Set the shadowsocks mode (server or client). +# Default is "server". +# shadowsocks_flags (str): Set the shadowsocks command line arguments +# Default is "". +# +# If you would like to have multiple shadowsocks instances running, you can +# define multiple profiles: +# +# shadowsocks_profiles (str): Set the list of shadowsocks profiles +# Default is "". +# +# For each profile you can then define different options (except for +# shadowsocks_enable) using the syntax shadowsocks__