Skip to content

Instantly share code, notes, and snippets.

@nanpuyue
Created February 16, 2019 14:34
Show Gist options
  • Save nanpuyue/19c55e443560feac47cba92a2ee5249d to your computer and use it in GitHub Desktop.
Save nanpuyue/19c55e443560feac47cba92a2ee5249d to your computer and use it in GitHub Desktop.
ss-local init.d script for openwrt
#!/bin/sh /etc/rc.common
# file: /etc/init.d/ss-local
# date: 2018-11-06
# license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt
# author: nanpuyue <[email protected]> https://blog.nanpuyue.com
START=95
USE_PROCD=1
start_service() {
for i in /etc/shadowsocks/*.json; do
procd_open_instance
procd_set_param command /usr/bin/ss-local -c "$i"
procd_set_param respawn
procd_close_instance
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment