mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-22 23:56:01 +00:00
1.使用OpenWrt提供的service_start及service_stop函数控制服务开关 2.由service_start函数生成pid文件 3.改配置文件目录为/etc/shadowsocks.json
17 lines
253 B
Bash
17 lines
253 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
START=95
|
|
|
|
SERVICE_USE_PID=1
|
|
SERVICE_WRITE_PID=1
|
|
SERVICE_DAEMONIZE=1
|
|
|
|
start() {
|
|
service_start /usr/bin/ss-local -c /etc/shadowsocks.json
|
|
}
|
|
|
|
stop() {
|
|
service_stop /usr/bin/ss-local
|
|
}
|